pass timeout
This commit is contained in:
parent
bab08369b9
commit
bf140a7ce3
1 changed files with 3 additions and 3 deletions
|
|
@ -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']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue