[youporn] 'a' and 'i' pattern are not supported (404 error)

This commit is contained in:
Alexandre Morignot 2015-02-06 09:46:12 +01:00 committed by Romain Bignon
commit 83fe30af8b

View file

@ -44,6 +44,9 @@ class YoupornBrowser(Browser):
return self.page.get_video(video)
def search_videos(self, pattern, sortby):
if pattern == 'a' or pattern == 'i':
raise ValueError('this pattern is not supported');
self.location(self.buildurl('/search/%s' % sortby, query=pattern.encode('utf-8')))
assert self.is_on_page(IndexPage)
return self.page.iter_videos()