HaarigerHarald / android-youtubeExtractor

Deprecated: Android based YouTube URL extractor and downloader
Other
877 stars 304 forks source link

Filter out videos using FORMAT_STREAM_TYPE_OTF #205

Closed Minos closed 2 years ago

Minos commented 2 years ago

I noticed that all videos that have "type": "FORMAT_STREAM_TYPE_OTF" produce a 404 error when trying to stream the URL. In youtube-dl repository they provide an explanation for this:

https://github.com/ytdl-org/youtube-dl/blob/a8035827177d6b59aca03bd717acb6a9bdd75ada/youtube_dl/extractor/youtube.py#L1620

This fixes the issue by filtering those formats out like they do in youtube-dl.

HaarigerHarald commented 2 years ago

Hi,

thanks but I get org.json.JSONException: No value for type. Maybe you did intend to use optString instead of getString.?

Minos commented 2 years ago

Hi, indeed, sorry I’m not familiar with this library and I thought I could make this tiny change without testing… my bad. Now it should be ok.