From bf140a7ce362938d8aec997ebc3b90df028fb093 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 28 Jan 2025 18:19:48 +0530 Subject: [PATCH] pass timeout --- ox/web/imdb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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']