pass on timeout
This commit is contained in:
parent
2a7e415271
commit
c09c6c156c
2 changed files with 5 additions and 1 deletions
|
@ -47,7 +47,7 @@ def find(query, max_results=DEFAULT_MAX_RESULTS, timeout=DEFAULT_TIMEOUT):
|
|||
>>> find("The Matrix site:imdb.com", 1)[0][1]
|
||||
u'http://www.imdb.com/title/tt0133093/'
|
||||
"""
|
||||
_results = _find(query)
|
||||
_results = _find(query, timeout=timeout)
|
||||
results = []
|
||||
for r in _results:
|
||||
results.append((r['titleNoFormatting'], r['unescapedUrl'], stripTags(r['content'])))
|
||||
|
|
|
@ -23,6 +23,10 @@ def getVideoKey(youtubeId, timeout=cache_timeout):
|
|||
return False
|
||||
|
||||
def getVideoUrl(youtubeId, format='mp4', timeout=cache_timeout):
|
||||
"""
|
||||
youtubeId - if of video
|
||||
format - video format, options: webm, 1080p, 720p, mp4, high
|
||||
"""
|
||||
youtubeKey = getVideoKey(youtubeId, timeout=timeout)
|
||||
|
||||
fmt = None
|
||||
|
|
Loading…
Reference in a new issue