use video link if its mp4(ubu)
This commit is contained in:
parent
9dd0c2416e
commit
36c1754725
1 changed files with 2 additions and 0 deletions
|
@ -47,6 +47,8 @@ def get_data(url):
|
||||||
match = re.compile('''src=(.*?) type="video/mp4"''').findall(data)
|
match = re.compile('''src=(.*?) type="video/mp4"''').findall(data)
|
||||||
if match:
|
if match:
|
||||||
m['mp4'] = match[0].strip('"').strip("'")
|
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))
|
doc = lxml.html.document_fromstring(read_url(url))
|
||||||
desc = doc.xpath("//div[contains(@id, 'ubudesc')]")
|
desc = doc.xpath("//div[contains(@id, 'ubudesc')]")
|
||||||
|
|
Loading…
Reference in a new issue