Skip to content

Add Gemini-backed multi-channel video watcher#2

Open
Timon0512 wants to merge 9 commits intocheck_for_new_videosfrom
codex/create-new_video_check.py-with-required-functions
Open

Add Gemini-backed multi-channel video watcher#2
Timon0512 wants to merge 9 commits intocheck_for_new_videosfrom
codex/create-new_video_check.py-with-required-functions

Conversation

@Timon0512
Copy link
Owner

Summary

  • replace the old single-channel poller with a CLI tool that can track multiple YouTube channels, persist state, and analyse new uploads with Gemini
  • add utilities for building the Gemini stock sentiment prompt and parsing the response into structured data
  • make the utils module configurable via an environment variable so that command line tooling can reuse the cached JSON store

Testing

  • python -m compileall .

https://chatgpt.com/codex/tasks/task_e_68e9fa899ea083219777ee2d8a865775

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 279 to 284
# Default command: check
api_key = getattr(args, "api_key", None) or os.getenv("GEMINI_API_KEY")
if not api_key:
raise SystemExit("Gemini API key missing. Provide via --api-key or GEMINI_API_KEY env var.")

check_for_new_videos(api_key=api_key, channel_ids=getattr(args, "channels", None), limit=args.limit)

Choose a reason for hiding this comment

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

P1 Badge Guard default CLI path when subcommand options are absent

The parser sets command to "check" by default, but when the script is run without an explicit subcommand the check subparser never runs and its arguments (limit, channels, etc.) are not attached to args. The subsequent call to check_for_new_videos(..., limit=args.limit) therefore raises AttributeError: 'Namespace' object has no attribute 'limit' as soon as GEMINI_API_KEY is present. Running GEMINI_API_KEY=dummy python new_video_check.py reproduces the crash. Access these attributes via getattr with defaults or explicitly invoke the check subparser to keep the default command functional.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant