Menu

Why youtube-transcript-api works on your laptop but fails on the server (and 3 ways to fix it)
📰

Why youtube-transcript-api works on your laptop but fails on the server (and 3 ways to fix it)

DEV Community: cloud·Damir Bolat·about 11 hours ago
#Tbq3DL65
#devtocloud#devto#dev#proxies#youtube
Reading 0:00
15s threshold

You wrote a few lines with youtube-transcript-api , it worked on your laptop, you deployed it to AWS, Google Cloud, Azure or a cheap VPS - and every call now fails with RequestBlocked or IpBlocked . Older versions of the library reported the same thing as TranscriptsDisabled , which sent many people hunting for a bug that wasn't there.

Your code is fine. The problem is where the request comes from.

Why it happens

YouTube refuses most requests that come from IP addresses known to belong to cloud providers. The library's own README says so: "YouTube has started blocking most IPs that are known to belong to cloud providers (like AWS, Google Cloud Platform, Azure, etc.)".…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.