yes-man-today
commited on
Commit
•
a98db89
1
Parent(s):
bca2b89
Error Code clarified
Browse files
regulatory_comments_api.py
CHANGED
@@ -54,7 +54,7 @@ class RegulationsDataFetcher:
|
|
54 |
if response.status_code == 200:
|
55 |
return response.json()
|
56 |
elif response.status_code == 429:
|
57 |
-
print(f'API Rate Limit Reached')
|
58 |
return None
|
59 |
|
60 |
else:
|
@@ -73,7 +73,7 @@ class RegulationsDataFetcher:
|
|
73 |
docket_data['data']['attributes']['docketType'],
|
74 |
docket_data['data']['attributes']['keywords'])
|
75 |
elif response.status_code == 429:
|
76 |
-
print(f'API Rate Limit Reached')
|
77 |
return None
|
78 |
|
79 |
else:
|
@@ -279,7 +279,7 @@ class RegCommentsAPI(datasets.GeneratorBasedBuilder):
|
|
279 |
docket_data = fetcher.collect_data()
|
280 |
|
281 |
if docket_data is None:
|
282 |
-
print(f"
|
283 |
break
|
284 |
|
285 |
if len(docket_data["comments"]) != 0:
|
|
|
54 |
if response.status_code == 200:
|
55 |
return response.json()
|
56 |
elif response.status_code == 429:
|
57 |
+
print(f'API Rate Limit Reached.')
|
58 |
return None
|
59 |
|
60 |
else:
|
|
|
73 |
docket_data['data']['attributes']['docketType'],
|
74 |
docket_data['data']['attributes']['keywords'])
|
75 |
elif response.status_code == 429:
|
76 |
+
print(f'API Rate Limit Reached.')
|
77 |
return None
|
78 |
|
79 |
else:
|
|
|
279 |
docket_data = fetcher.collect_data()
|
280 |
|
281 |
if docket_data is None:
|
282 |
+
print(f"Stopping Data Collection.")
|
283 |
break
|
284 |
|
285 |
if len(docket_data["comments"]) != 0:
|