use video link if its mp4(ubu)

This commit is contained in:
j 2015-03-15 02:25:31 +05:30
parent 9dd0c2416e
commit 36c1754725

View file

@ -47,6 +47,8 @@ def get_data(url):
match = re.compile('''src=(.*?) type="video/mp4"''').findall(data)
if match:
m['mp4'] = match[0].strip('"').strip("'")
elif 'video' in m and m['video'].endswith('.mp4'):
m['mp4'] = m['video']
doc = lxml.html.document_fromstring(read_url(url))
desc = doc.xpath("//div[contains(@id, 'ubudesc')]")