Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(updater): cache youtube requests #167

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

ReenigneArcher
Copy link
Member

@ReenigneArcher ReenigneArcher commented Jan 5, 2025

Description

  • Try to cache youtube api requests (difficult to achieve since videos are grouped into groups of 50 per request)
  • Update python to 3.12
  • Change working directory to repository root directory, files still written to gh-pages
  • Run PRs in test mode (less requests total)

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

@ReenigneArcher ReenigneArcher requested a review from Copilot January 5, 2025 18:00

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/update_db.py:91

  • The variable 'args' is used without being defined in the function scope. Ensure 'args' is defined or passed as a parameter.
url = f'{uri}?id={videos}&key={args.youtube_api_key}&part=snippet&fields={fields}'

src/update_db.py:57

  • The variable 'args' is used without being defined in the function scope. Ensure 'args' is defined or passed as a parameter.
json.dump(obj=data, fp=f, indent=args.indent)
@ReenigneArcher ReenigneArcher enabled auto-merge (squash) January 5, 2025 18:02
@ReenigneArcher ReenigneArcher force-pushed the feat/updater/cache-youtube-requests branch from c9dfd8b to e27253e Compare January 5, 2025 18:16
Copy link

sonarqubecloud bot commented Jan 5, 2025

@ReenigneArcher ReenigneArcher merged commit d47f422 into master Jan 5, 2025
10 checks passed
@ReenigneArcher ReenigneArcher deleted the feat/updater/cache-youtube-requests branch January 5, 2025 18:32
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.

excessive youtube api requests
1 participant