Enforce 10s connection timeout

This commit is contained in:
Thomas Wade 2020-12-03 23:48:17 +10:30
parent a2353add61
commit 4b72b7c593
2 changed files with 2 additions and 2 deletions

View File

@ -623,7 +623,7 @@ class FAAPI:
:param url: Webpage URL
:return: Webpage wrapped in a BeautifulSoup instance
"""
res = self._req.get(url)
res = self._req.get(url, timeout=10)
if res.status_code >= 400:
raise Exception(
'Got status code {} when trying to get URL {}'.format(res.status_code, url))

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name='FAAPI',
version='0.6.6',
version='0.6.7',
packages=find_packages(),
url='https://tem.party/gitea/tom/FAAPI',
license='WTFPL',