Risposta server come Dict e modifiche varie

This commit is contained in:
Alhaziel01
2021-08-28 18:10:47 +02:00
parent 8975f950c5
commit 60ec158008
108 changed files with 330 additions and 361 deletions
+3 -3
View File
@@ -39,9 +39,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
videoSources = re.findall("<source[\s]+src=[\"'](?P<url>[^\"']+)[^>]+label=[\"'](?P<label>[^\"']+)", strResult)
for url, label in videoSources:
url += "|Referer=%s" %page_url
video_urls.append([label, url])
video_urls.sort(key=lambda i: int(i[0].replace("p","")))
video_urls.append({'type':label, 'url':url})
# video_urls.sort(key=lambda i: int(i[0].replace("p","")))
except:
url = scrapertools.find_single_match(data,'<source src="([^"]+)')
video_urls.append(["MP4", url])
video_urls.append({'type':'mp4', 'url':url})
return video_urls