1
0

fix: Update WaniKaniLessonsFetcher docstring and remove print statement

This commit is contained in:
Jon Michael Aanes (aider) 2025-03-16 15:03:33 +01:00
parent c5e2a3471d
commit 18a8f8dad8

View File

@ -15,10 +15,7 @@ class WaniKaniLessonsFetcher(Scraper):
deduplicate_mode = DeduplicateMode.BY_ALL_COLUMNS
def scrape(self) -> Iterator[Mapping[str, object]]:
"""
Fetch assignments from the WaniKani API and yield a dict for each assignment
with a non-null unlocked_at timestamp.
"""
"""Fetch assignments from the WaniKani API and yield a dict for each assignment with a non-null unlocked_at timestamp."""
url = 'https://api.wanikani.com/v2/assignments'
headers = {
'Authorization': f'Bearer {secrets.wanikani_api_key()}',
@ -30,6 +27,5 @@ class WaniKaniLessonsFetcher(Scraper):
json_resp = response.json()
for assignment in json_resp.get('data', []):
data_item = assignment['data']
print(data_item)
yield data_item
url = json_resp.get('pages', {}).get('next_url')