diff --git a/ox/web/imdb.py b/ox/web/imdb.py index 9fcbb7d..ac5590d 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -578,7 +578,7 @@ class Imdb(SiteParser): pass #self['connections'] = movie_connections(self.get_page_data('movieconnections')) - self['connections'] = self._get_connections() + self['connections'] = self._get_connections(timeout) spec = tech_spec(self.get_page_data('technical')) for key in spec: @@ -685,7 +685,7 @@ class Imdb(SiteParser): self['episodeDirector'] = self['director'] self['director'] = self['creator'] - def _get_connections(self): + def _get_connections(self, timeout=-1): query = '''query { title(id: "tt%s") { id @@ -725,7 +725,7 @@ class Imdb(SiteParser): #response = requests.post(url, json= response = json.loads(read_url(url, data=json.dumps({ "query": query - }), headers=headers)) + }), headers=headers, timeout=timeout)) connections = {} for c in response['data']['title']['connections']['edges']: cat = c['node']['category']['text']