We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f38b8b0 commit 185c8edCopy full SHA for 185c8ed
CodeForcesScraper.py
@@ -1,5 +1,6 @@
1
import requests
2
import json
3
+from time import sleep
4
from bs4 import BeautifulSoup
5
6
@@ -27,13 +28,12 @@ def get_submission_info(username):
27
28
29
30
def get_code(html):
- for _ in range(2):
31
- try:
32
- soup = BeautifulSoup(html, 'lxml')
33
- return soup.select_one('#program-source-text').text
+ try:
+ soup = BeautifulSoup(html, 'lxml')
+ return soup.select_one('#program-source-text').text
34
35
- except:
36
- return None
+ except:
+ sleep(60)
37
38
39
def get_solutions(username, all_info=None):
0 commit comments