yes-man-today commited on
Commit
904abf8
1 Parent(s): 586c1f2

new update

Browse files
Files changed (1) hide show
  1. regulatory_comments_api.py +6 -5
regulatory_comments_api.py CHANGED
@@ -186,11 +186,12 @@ class RegCommentsAPI(datasets.GeneratorBasedBuilder):
186
  # Iterate over each search term to fetch relevant dockets
187
  for term in search_terms:
188
  docket_ids = get_docket_ids(term, api_key) # Pass the API key here
189
- for docket_id in docket_ids:
190
- fetcher = RegulationsDataFetcher(docket_id, api_key) # Initialize with the API key
191
- docket_data = fetcher.collect_data()
192
- if len(docket_data["comments"]) != 0:
193
- yield docket_id, docket_data
 
194
 
195
  # Modify the get_docket_ids function to accept an API key
196
  def get_docket_ids(search_term, api_key):
 
186
  # Iterate over each search term to fetch relevant dockets
187
  for term in search_terms:
188
  docket_ids = get_docket_ids(term, api_key) # Pass the API key here
189
+
190
+ for docket_id in docket_ids:
191
+ fetcher = RegulationsDataFetcher(docket_id, api_key) # Initialize with the API key
192
+ docket_data = fetcher.collect_data()
193
+ if len(docket_data["comments"]) != 0:
194
+ yield docket_id, docket_data
195
 
196
  # Modify the get_docket_ids function to accept an API key
197
  def get_docket_ids(search_term, api_key):