Skip to content

Fetchers/listen notes - #25

Open
arundhatisingh17 wants to merge 6 commits into
Infrasity-Labs:mainfrom
arundhatisingh17:fetchers/listen_notes
Open

Fetchers/listen notes#25
arundhatisingh17 wants to merge 6 commits into
Infrasity-Labs:mainfrom
arundhatisingh17:fetchers/listen_notes

Conversation

@arundhatisingh17

Copy link
Copy Markdown

I added a fetcher for ListenNotes. The free quota allows the user to make only 300 requests in a month. Given that the cron job defined in the yml file makes a call once a day, I have capped the number of requests at 10. I have defined a set of keywords and am rotating between them based on variables like the day of the year to ensure we aggregate all kinds of podcasts over time.

Please note that the maintainer must create an API key on Listen Notes and add it to the repo as a secret named LISTENNOTES_API_KEY for data to be scraped successfully.

Fixes #17

@gitar-bot

gitar-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new script fetchers/listen_notes.py to fetch podcasts from the Listen Notes API, utilizing a daily rotation of search queries to stay within the free tier limit. Feedback points out that overwriting data/listennotes.json on each run discards podcasts fetched on previous days, and suggests loading and merging existing data at startup instead.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread fetchers/listen_notes.py
Comment on lines +77 to +78
filepath = 'data/listennotes.json'
podcast_map = {}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Since this script only runs a subset of queries (10 per day) to stay within the free tier limit, overwriting data/listennotes.json on each run will discard all podcasts fetched on previous days. To ensure we accumulate and rotate podcasts over time as intended, we should load the existing data/listennotes.json file (if it exists) at startup and merge the new results into it.

    filepath = 'data/listennotes.json'
    podcast_map = {}
    if os.path.exists(filepath):
        try:
            with open(filepath, 'r', encoding='utf-8') as f:
                for item in json.load(f):
                    title = item.get("title")
                    if title:
                        podcast_map[title] = item
        except Exception as e:
            print(f"Warning: Failed to load existing podcasts from {filepath}: {e}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a new podcast fetcher

1 participant