Skip to content

Fix production failures by updating user agents and adding retry mechanism#50

Open
RisHexx wants to merge 1 commit into
Kakulukian:masterfrom
RisHexx:fix-prod
Open

Fix production failures by updating user agents and adding retry mechanism#50
RisHexx wants to merge 1 commit into
Kakulukian:masterfrom
RisHexx:fix-prod

Conversation

@RisHexx
Copy link
Copy Markdown

@RisHexx RisHexx commented Mar 21, 2026

Problem

Library worked locally but failed in production VMs due to YouTube's anti-bot measures blocking requests with outdated user agents and incomplete headers.

Summary

  • Updates outdated user agent strings (Chrome 85 → Chrome 120)
  • Adds comprehensive browser headers for better request fingerprinting
  • Implements retry mechanism with exponential backoff for rate limiting
  • Updates InnerTube API client version to avoid detection

Solution

  • User Agent: Updated from 2020 Chrome 85 to current Chrome 120
  • Headers: Added proper Accept, Sec-Ch-*, Origin, Referer headers to mimic real browsers
  • Retry Logic: Auto-retry failed requests (3x max) with exponential backoff
  • API Version: Updated InnerTube client version for better compatibility

Impact

Resolves production blocking issues while maintaining full backward compatibility.

@RisHexx
Copy link
Copy Markdown
Author

RisHexx commented Mar 22, 2026

#38

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.

1 participant