diff --git a/budou/budou.py b/budou/budou.py index a5bee1e..1e5ef47 100644 --- a/budou/budou.py +++ b/budou/budou.py @@ -20,6 +20,7 @@ from . import api, cachefactory import collections import google.auth +import google_auth_httplib2 from googleapiclient import discovery from xml.etree import ElementTree as ET import html5lib @@ -187,8 +188,8 @@ def authenticate(cls, json_path=None): authenticate with default credentials.''') else: scoped_credentials, project = google.auth.default(scope) - service = discovery.build( - 'language', 'v1beta2', credentials=scoped_credentials) + authed_http = google_auth_httplib2.AuthorizedHttp(scoped_credentials) + service = discovery.build('language', 'v1beta2', http=authed_http) return cls(service) def parse(self, source, attributes=None, use_cache=True, language=None,