Fix getting youjizz video URLs, better test

This commit is contained in:
Laurent Bachelier 2012-03-16 01:28:49 +01:00 committed by Romain Bignon
commit 4d628112d5
2 changed files with 3 additions and 1 deletions

View file

@ -54,7 +54,7 @@ class VideoPage(BasePage):
else:
raise BrokenPageError('Unable to retrieve video duration')
video_file_urls = re.findall(r'"(http://[^",]+\.youjizz\.com[^",]+\.flv)[\?"]', data)
video_file_urls = re.findall(r'"(http://[^",]+\.youjizz\.com[^",]+\.flv(?:\?[^"]*)?)"', data)
if len(video_file_urls) == 0:
raise BrokenPageError('Video URL not found')
elif len(video_file_urls) > 1: