Update redirects.py
This commit is contained in:
@@ -19,27 +19,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
request = urllib2.Request(jk_url, headers=request_headers)
|
||||
response = urllib2.urlopen(request)
|
||||
video_urls.append([".mp4 [redirects]", response.geturl()])
|
||||
else:
|
||||
headers = []
|
||||
headers.append(["User-Agent",
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"])
|
||||
headers.append(["Accept-Encoding", "gzip,deflate,sdch"])
|
||||
page_url = page_url.replace("https://animeflv.net/embed_izanagi.php?key=",
|
||||
"https://s2.animeflv.net/izanagi.php?id=")
|
||||
page_url = page_url.replace("http://animeflv.net/embed_yotta.php?key=",
|
||||
"https://s1.animeflv.com/gdrive.php?id=")
|
||||
data = scrapertools.cache_page(page_url, headers=headers)
|
||||
data = data.replace("\\\\", "")
|
||||
data = data.replace("\\/", "/")
|
||||
patronvideos = '"file":"(.+?)"'
|
||||
matches = re.compile(patronvideos, re.DOTALL).findall(data)
|
||||
for match in matches:
|
||||
video_urls.append([".mp4 [redirects]", match])
|
||||
|
||||
patronvideos = '(http://www.animeid.+?)"'
|
||||
matches = re.compile(patronvideos, re.DOTALL).findall(data)
|
||||
for match in matches:
|
||||
response = urllib2.urlopen(match)
|
||||
video_urls.append([".mp4 [redirects]", response.geturl()])
|
||||
|
||||
return video_urls
|
||||
|
||||
Reference in New Issue
Block a user