Skip to content

Commit

Permalink
disable discovery cache to prevent
Browse files Browse the repository at this point in the history
"file_cache is unavailable when using oauth2client >= 4.0.0" errors
 as hinted in googleapis/google-api-python-client#299 (comment)
  • Loading branch information
SathyaBhat committed Feb 19, 2017
1 parent 5839c35 commit 331a242
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spotify_dl/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def fetch_youtube_url(search_term):
and return the list of URLs"""
YOUTUBE_DEV_KEY = getenv('YOUTUBE_DEV_KEY')
youtube = build(YOUTUBE_API_SERVICE_NAME, YOUTUBE_API_VERSION,
developerKey=YOUTUBE_DEV_KEY)
developerKey=YOUTUBE_DEV_KEY,
cache_discovery=False)
log.info(u"Searching for {}".format(search_term))
search_response = youtube.search().list(q=search_term,
part='id, snippet').execute()
Expand Down

0 comments on commit 331a242

Please sign in to comment.