diff --git a/servers/wstream.py b/servers/wstream.py index 05256db9..9c1595d8 100644 --- a/servers/wstream.py +++ b/servers/wstream.py @@ -58,11 +58,11 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= video_urls = [] global data, real_url - sitekey = scrapertools.find_single_match(data, """data-sitekey=['"] *([^"']+)""") + sitekey = scrapertools.find_multiple_matches(data, """data-sitekey=['"] *([^"']+)""") + if sitekey: sitekey = sitekey[-1] captcha = platformtools.show_recaptcha(sitekey, page_url) if sitekey else '' - possibleParam = scrapertools.find_multiple_matches(data, - r"""|>)""") + possibleParam = scrapertools.find_multiple_matches(data,r"""|>)""") if possibleParam: post = {param[0]: param[1] for param in possibleParam if param[0]} if captcha: post['g-recaptcha-response'] = captcha diff --git a/specials/downloads.py b/specials/downloads.py index 2f42dcf9..15a4af03 100644 --- a/specials/downloads.py +++ b/specials/downloads.py @@ -782,11 +782,9 @@ def get_episodes(item): episode.contentTitle = re.sub("\[[^\]]+\]|\([^\)]+\)|\d*x\d*\s*-", "", episode.title).strip() episode.downloadFilename = filetools.validate_path(filetools.join(item.downloadFilename, "%dx%0.2d - %s" % (episode.contentSeason, episode.contentEpisodeNumber, episode.contentTitle.strip()))) - itemlist.append(episode) - - if season: - if scrapertools.find_single_match(episode.title, r'(\d+)x') == season_number: - itemlist.append(episode) + if season: + if scrapertools.find_single_match(episode.title, r'(\d+)x') == season_number: + itemlist.append(episode) else: itemlist.append(episode) # Cualquier otro resultado no nos vale, lo ignoramos