list questions too slow

This commit is contained in:
2017-08-09 14:50:39 +08:00
parent 7c051beb88
commit d7c6f1d1ba

View File

@ -33,7 +33,7 @@ class kuser_api:
def list_questions(self): def list_questions(self):
try: try:
questions = {} questions = {}
response = self.session.get(config.URL + '/HomeworkBoard', timeout=0.1) response = self.session.get(config.URL + '/HomeworkBoard', timeout=0.5)
soup = BeautifulSoup(response.text, 'html.parser') soup = BeautifulSoup(response.text, 'html.parser')
for tag in soup.find_all('tr'): for tag in soup.find_all('tr'):
if tag.find('a') == None: if tag.find('a') == None: