[youporn] 'a' and 'i' pattern are not supported (404 error)
This commit is contained in:
parent
592d2ec112
commit
83fe30af8b
1 changed files with 3 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue