Miglioria streamSB
This commit is contained in:
+4
-2
@@ -2,7 +2,8 @@
|
|||||||
# https://github.com/tvaddonsco/script.module.urlresolver/blob/master/lib/urlresolver/plugins/streamsb.py
|
# https://github.com/tvaddonsco/script.module.urlresolver/blob/master/lib/urlresolver/plugins/streamsb.py
|
||||||
|
|
||||||
from core import httptools, scrapertools
|
from core import httptools, scrapertools
|
||||||
from platformcode import config
|
from platformcode import config, logger
|
||||||
|
import time
|
||||||
|
|
||||||
host = 'streamsb.net'
|
host = 'streamsb.net'
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
video_urls = []
|
video_urls = []
|
||||||
global data
|
global data
|
||||||
sources = scrapertools.find_multiple_matches(data, r'download_video([^"]+)[^\d]+\d+x(\d+)')
|
sources = scrapertools.find_multiple_matches(data, r'download_video([^"]+)[^\d]+\d+x(\d+)')
|
||||||
|
time.sleep(1)
|
||||||
if sources:
|
if sources:
|
||||||
sources.sort(key=lambda x: int(x[1]), reverse=True)
|
sources.sort(key=lambda x: int(x[1]), reverse=True)
|
||||||
sources = [(x[1] + 'p', x[0]) for x in sources]
|
sources = [(x[1] + 'p', x[0]) for x in sources]
|
||||||
@@ -30,5 +32,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
data = httptools.downloadpage(dl_url).data
|
data = httptools.downloadpage(dl_url).data
|
||||||
media_url = scrapertools.find_single_match(data, 'href="([^"]+)">Direct')
|
media_url = scrapertools.find_single_match(data, 'href="([^"]+)">Direct')
|
||||||
if media_url:
|
if media_url:
|
||||||
video_urls.append(["MP4", media_url])
|
video_urls.append([s[0], media_url])
|
||||||
return video_urls
|
return video_urls
|
||||||
|
|||||||
Reference in New Issue
Block a user