Add timeout
This commit is contained in:
parent
9815372297
commit
d7baa1f232
1 changed files with 1 additions and 1 deletions
2
crawl.py
2
crawl.py
|
@ -37,7 +37,7 @@ def crawl():
|
|||
|
||||
|
||||
def fetch(url):
|
||||
page_data = requests.get(url)
|
||||
page_data = requests.get(url, timeout=10)
|
||||
return page_data.text
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue