mirror of
https://github.com/soimort/you-get.git
synced 2025-02-10 12:12:26 +03:00
Sleep for an interval between retries
This commit is contained in:
parent
9bb17d160e
commit
58cd2a0de5
@ -421,6 +421,8 @@ def urlopen_with_retry(*args, **kwargs):
|
|||||||
if i + 1 == retry_time:
|
if i + 1 == retry_time:
|
||||||
raise url_error
|
raise url_error
|
||||||
|
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
|
|
||||||
def get_content(url, headers={}, decoded=True):
|
def get_content(url, headers={}, decoded=True):
|
||||||
"""Gets the content of a URL via sending a HTTP GET request.
|
"""Gets the content of a URL via sending a HTTP GET request.
|
||||||
|
Loading…
Reference in New Issue
Block a user