Closed Minos closed 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
.?
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.
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.