return instead of yield set()
This commit is contained in:
parent
86aadbd1fa
commit
22cb3e1cbd
3 changed files with 3 additions and 3 deletions
|
|
@ -42,4 +42,4 @@ class InaBackend(BaseBackend, ICapVideo):
|
||||||
|
|
||||||
def iter_search_results(self, pattern=None, sortby=ICapVideo.SEARCH_RELEVANCE, nsfw=False, required_fields=None):
|
def iter_search_results(self, pattern=None, sortby=ICapVideo.SEARCH_RELEVANCE, nsfw=False, required_fields=None):
|
||||||
debug(u'backend ina: iter_search_results is not implemented')
|
debug(u'backend ina: iter_search_results is not implemented')
|
||||||
return []
|
return
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,6 @@ class YoujizzBackend(BaseBackend, ICapVideo):
|
||||||
|
|
||||||
def iter_search_results(self, pattern=None, sortby=ICapVideo.SEARCH_RELEVANCE, nsfw=False, required_fields=None):
|
def iter_search_results(self, pattern=None, sortby=ICapVideo.SEARCH_RELEVANCE, nsfw=False, required_fields=None):
|
||||||
if not nsfw:
|
if not nsfw:
|
||||||
yield iter(set())
|
return
|
||||||
for video in self.browser.iter_search_results(pattern, required_fields=required_fields):
|
for video in self.browser.iter_search_results(pattern, required_fields=required_fields):
|
||||||
yield video
|
yield video
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class YoupornBackend(BaseBackend, ICapVideo):
|
||||||
SORTBY = ['relevance', 'rating', 'views', 'time']
|
SORTBY = ['relevance', 'rating', 'views', 'time']
|
||||||
def iter_search_results(self, pattern=None, sortby=ICapVideo.SEARCH_RELEVANCE, nsfw=False, required_fields=None):
|
def iter_search_results(self, pattern=None, sortby=ICapVideo.SEARCH_RELEVANCE, nsfw=False, required_fields=None):
|
||||||
if not nsfw:
|
if not nsfw:
|
||||||
return iter(set())
|
return
|
||||||
return self.browser.iter_search_results(pattern, self.SORTBY[sortby], required_fields=required_fields)
|
return self.browser.iter_search_results(pattern, self.SORTBY[sortby], required_fields=required_fields)
|
||||||
|
|
||||||
def iter_page_urls(self, mozaic_url):
|
def iter_page_urls(self, mozaic_url):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue