better title
This commit is contained in:
parent
c4c0c40825
commit
16a955f310
1 changed files with 2 additions and 1 deletions
|
@ -24,7 +24,7 @@ def get_data(url):
|
|||
'url': url,
|
||||
'type': re.compile('ubu.com/(.*?)/').findall(url)[0]
|
||||
}
|
||||
for videourl, title in re.compile('<a href="(http://ubumexico.centro.org.mx/.*?)">(.*?)</a>').findall(data):
|
||||
for videourl, title in re.compile('href="(http://ubumexico.centro.org.mx/.*?)">(.*?)</a>').findall(data):
|
||||
if videourl.endswith('.srt'):
|
||||
m['srt'] = videourl
|
||||
elif not 'video' in m:
|
||||
|
@ -32,6 +32,7 @@ def get_data(url):
|
|||
m['video'] = m['video'].replace('/video/ ', '/video/').replace(' ', '%20')
|
||||
if m['video'] == 'http://ubumexico.centro.org.mx/video/':
|
||||
del m['video']
|
||||
if not 'title' in m:
|
||||
m['title'] = strip_tags(decode_html(title)).strip()
|
||||
if not 'url' in m:
|
||||
print(url, 'missing')
|
||||
|
|
Loading…
Reference in a new issue