Enforce 10s connection timeout
This commit is contained in:
parent
a2353add61
commit
4b72b7c593
@ -623,7 +623,7 @@ class FAAPI:
|
|||||||
:param url: Webpage URL
|
:param url: Webpage URL
|
||||||
:return: Webpage wrapped in a BeautifulSoup instance
|
:return: Webpage wrapped in a BeautifulSoup instance
|
||||||
"""
|
"""
|
||||||
res = self._req.get(url)
|
res = self._req.get(url, timeout=10)
|
||||||
if res.status_code >= 400:
|
if res.status_code >= 400:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
'Got status code {} when trying to get URL {}'.format(res.status_code, url))
|
'Got status code {} when trying to get URL {}'.format(res.status_code, url))
|
||||||
|
|||||||
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='FAAPI',
|
name='FAAPI',
|
||||||
version='0.6.6',
|
version='0.6.7',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
url='https://tem.party/gitea/tom/FAAPI',
|
url='https://tem.party/gitea/tom/FAAPI',
|
||||||
license='WTFPL',
|
license='WTFPL',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user