prototype extracting
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
from ratelimit.decorators import sleep_and_retry
|
||||
import requests
|
||||
from ratelimit import limits, RateLimitException
|
||||
from backoff import expo, on_exception
|
||||
|
||||
|
||||
class Leetify:
|
||||
@@ -6,6 +9,8 @@ class Leetify:
|
||||
profile_base_url = f"{api_base_url}/profile"
|
||||
match_base_url = f"{api_base_url}/games"
|
||||
|
||||
@sleep_and_retry
|
||||
@limits(1, 5)
|
||||
def __get_page(self, url: str) -> dict:
|
||||
resp = requests.get(url)
|
||||
return resp.json()
|
||||
|
||||
Reference in New Issue
Block a user