Fix Fembed e Streamtape
This commit is contained in:
+2
-2
@@ -3,8 +3,8 @@
|
|||||||
"find_videos": {
|
"find_videos": {
|
||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [{
|
"patterns": [{
|
||||||
"pattern": "(?:fembed|divload|cercafilm|sonline|verystream|animeworld).(?:com|net|pro|info|biz)/((?:f|v)/[A-z0-9_-]+)",
|
"pattern": "((?:fembed|divload|cercafilm|sonline|verystream|animeworld|tantifilm).([^/]+)/(?:f|v)/[A-z0-9_-]+)",
|
||||||
"url": "https://www.feurl.com/\\1"
|
"url": "https://\\1"
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
"free": true,
|
"free": true,
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ def test_video_exists(page_url):
|
|||||||
logger.debug("(page_url='%s')" % page_url)
|
logger.debug("(page_url='%s')" % page_url)
|
||||||
global data
|
global data
|
||||||
|
|
||||||
page_url = re.sub('://[^/]+/', '://feurl.com/', page_url)
|
# page_url = re.sub('://[^/]+/', '://feurl.com/', page_url)
|
||||||
data = httptools.downloadpage(page_url).data
|
data = httptools.downloadpage(page_url).data
|
||||||
if "Sorry 404 not found" in data or "This video is unavailable" in data or "Sorry this video is unavailable:" in data:
|
if "Sorry 404 not found" in data or "This video is unavailable" in data or "Sorry this video is unavailable:" in data:
|
||||||
return False, config.get_localized_string(70449) % "fembed"
|
return False, config.get_localized_string(70449) % "fembed"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
from core import httptools, scrapertools
|
from core import httptools, scrapertools
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
|
from core.support import match
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
PY3 = False
|
PY3 = False
|
||||||
@@ -26,11 +27,16 @@ def test_video_exists(page_url):
|
|||||||
|
|
||||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||||
logger.debug("url=" + page_url)
|
logger.debug("url=" + page_url)
|
||||||
|
# from core .support import dbg;dbg()
|
||||||
|
|
||||||
video_urls = []
|
video_urls = []
|
||||||
possible_url = scrapertools.find_single_match(data, 'innerHTML = "([^"]+)')
|
possible_url = ''
|
||||||
|
find_url = match(data, patron=r'''innerHTML = ["']([^"]+)["'](?:\s*\+\s*['"]([^"']+))?''').match
|
||||||
|
for m in find_url:
|
||||||
|
possible_url += m
|
||||||
|
|
||||||
if not possible_url:
|
if not possible_url:
|
||||||
possible_url = scrapertools.find_single_match(data, "innerHTML\\'\]=\\'([^']+)")
|
possible_url = match(data, patron=r"innerHTML\\'\]=\\'([^']+)").match
|
||||||
url = "https:" + possible_url
|
url = "https:" + possible_url
|
||||||
url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "")
|
url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "")
|
||||||
video_urls.append(['MP4 [Streamtape]', url])
|
video_urls.append(['MP4 [Streamtape]', url])
|
||||||
|
|||||||
Reference in New Issue
Block a user