diff --git a/servers/streamsb.py b/servers/streamsb.py index 0d1319e1..ebbe8aa1 100644 --- a/servers/streamsb.py +++ b/servers/streamsb.py @@ -2,7 +2,8 @@ # https://github.com/tvaddonsco/script.module.urlresolver/blob/master/lib/urlresolver/plugins/streamsb.py from core import httptools, scrapertools -from platformcode import config +from platformcode import config, logger +import time host = 'streamsb.net' @@ -21,6 +22,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= video_urls = [] global data sources = scrapertools.find_multiple_matches(data, r'download_video([^"]+)[^\d]+\d+x(\d+)') + time.sleep(1) if sources: sources.sort(key=lambda x: int(x[1]), reverse=True) 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 media_url = scrapertools.find_single_match(data, 'href="([^"]+)">Direct') if media_url: - video_urls.append(["MP4", media_url]) + video_urls.append([s[0], media_url]) return video_urls