diff --git a/plugin.video.alfa/servers/rapidvideo.py b/plugin.video.alfa/servers/rapidvideo.py index 5aad58d3..a0e591e4 100755 --- a/plugin.video.alfa/servers/rapidvideo.py +++ b/plugin.video.alfa/servers/rapidvideo.py @@ -30,11 +30,14 @@ def test_video_exists(page_url): def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("url=" + page_url) video_urls = [] - data = httptools.downloadpage(page_url).data - urls = scrapertools.find_multiple_matches(data, '"file":"([^"]+)","label":"[^"]*","res":"([^"]+)"') - for mediaurl, res in urls: - ext = scrapertools.get_filename_from_url(mediaurl)[-4:] - video_urls.append(['%s %sp [rapidvideo]' % (ext, res), mediaurl.replace("\\", "")]) + patron = 'https://www.rapidvideo.com/e/[^"]+' + match = scrapertools.find_multiple_matches(data, patron) + for url1 in match: + res = scrapertools.find_single_match(url1, '=(\w+)') + data = httptools.downloadpage(url1).data + url = scrapertools.find_single_match(data, 'source src="([^"]+)') + ext = scrapertools.get_filename_from_url(url)[-4:] + video_urls.append(['%s %s [rapidvideo]' % (ext, res), url]) return video_urls