diff --git a/ox/web/ubu.py b/ox/web/ubu.py index b14a7e4..4bc32cf 100644 --- a/ox/web/ubu.py +++ b/ox/web/ubu.py @@ -24,7 +24,7 @@ def get_data(url): 'url': url, 'type': re.compile('ubu.com/(.*?)/').findall(url)[0] } - for videourl, title in re.compile('(.*?)').findall(data): + for videourl, title in re.compile('href="(http://ubumexico.centro.org.mx/.*?)">(.*?)').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')