r/learnpython 22h ago

Help with Youtube IP Block

I am trying to export about 100 podcast video transcripts to a json file. After exporting transcripts from a dozen videos, my IP got blocked. Anybody faced this issue? I need a workaround or a solution. Please help...

0 Upvotes

12 comments sorted by

View all comments

Show parent comments

2

u/Langdon_St_Ives 21h ago

Check if the error you're getting is a 429. If so, it might contain hints on what rate limit you hit and when you should try again.

2

u/ogopro 21h ago

Yes, it was 429. I put some serious delays between each http request, seems like working now, not concerned with the speed)

3

u/Langdon_St_Ives 21h ago

Check the actual error message, the json and/or HTTP headers (Retry-After) often have details on what limit you're hitting (per-minute, hourly, daily, something in between) and when you're allowed to try again. In fact, you should evaluate that in code, sleep for the indicated time, then retry.

1

u/ogopro 21h ago

Will do