Kethsar / ytarchive

Garbage Youtube livestream downloader
MIT License
1.04k stars 86 forks source link

Suppress or gracefully handle yt IP block #132

Closed Carravan closed 1 year ago

Carravan commented 1 year ago

I've found myself in a situation where my hosting provider's IPs are all blocked from manifest downloads, see pictures below. image Won't serve DASH manifest because someone's been naughts image This is the structure of the page, not valid XML and matches warning image Warning here

ytarchive is throwing the reply directly into the XML parser, which then manifests like this.

2023/02/27 01:27:38 DEBUG: Retrieving URLs from Android DASH manifest
2023/02/27 01:27:39 WARNING: Error parsing DASH manifest: XML syntax error on line 3: element <meta> closed by </head>
2023/02/27 01:27:39 DEBUG: Retrieving URLs from Android adaptive formats
2023/02/27 01:27:39 TRACE: Setting itag 299 from Android adaptive formats
2023/02/27 01:27:39 TRACE: Setting itag 298 from Android adaptive formats
2023/02/27 01:27:39 TRACE: Setting itag 135 from Android adaptive formats
2023/02/27 01:27:39 TRACE: Setting itag 134 from Android adaptive formats
2023/02/27 01:27:39 TRACE: Setting itag 133 from Android adaptive formats
2023/02/27 01:27:39 TRACE: Setting itag 160 from Android adaptive formats
2023/02/27 01:27:39 TRACE: Setting itag 139 from Android adaptive formats
2023/02/27 01:27:39 TRACE: Setting itag 140 from Android adaptive formats
2023/02/27 01:27:39 DEBUG: Retrieving URLs from web DASH manifest
2023/02/27 01:27:39 WARNING: Error parsing DASH manifest: XML syntax error on line 3: element <meta> closed by </head>
2023/02/27 01:27:39 DEBUG: Retrieving URLs from web adaptive formats
2023/02/27 01:27:39 TRACE: Setting itag 136 from web adaptive formats
Available video qualities: audio_only, 144p, 240p, 360p, 480p, 720p, 720p60, 1080p60, best

With the 20 or so instances of ytarchive running on my machine, all using --retry-stream 120, my log is full of these warnings, but I don't think they are critical enough to warrant the warning level, given that there's a fallback. Could these be handled more graceful?

Kethsar commented 1 year ago

Fixed in c1466abd71ba37e6b9d1bf69158bdd096ed8a9df Though there won't be an auto-build for it until the next set of changes I push to master, god knows when. I can attach a zip with the exe here if you want.

Carravan commented 1 year ago

I'll rebuild from master, thanks! Edit: I misread that but it's fine

Kethsar commented 1 year ago

You'll want to build from the dev branch instead @Carravan