Skip to content

plugins.turkuvaz: fix/partial rewrite #5374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

mkbloke
Copy link
Member

@mkbloke mkbloke commented Jun 5, 2023

$ script/test-plugin-urls.py turkuvaz
:: Finding streams for URL: https://vavtv.com.tr/canli-yayin
:: Found streams: 240p, 360p, 480p, 720p, worst, best
:: Finding streams for URL: https://vavtv.com.tr/vavradyo/video/guncel/munafiklarin-ozellikleri-nelerdir
:: Found streams: 720p, worst, best
:: Finding streams for URL: https://www.ahaber.com.tr/canli-yayin-a2tv.html
:: Found streams: 240p, 360p, 480p, 720p, worst, best
:: Finding streams for URL: https://www.ahaber.com.tr/canli-yayin-anews.html
:: Found streams: 240p, 360p, 480p, 720p, worst, best
:: Finding streams for URL: https://www.ahaber.com.tr/canli-yayin-aspor.html
:: Found streams: 240p, 360p, 480p, 864p, worst, best
:: Finding streams for URL: https://www.ahaber.com.tr/canli-yayin-atv.html
:: Found streams: 288p, 432p, 864p, 1080p, worst, best
:: Finding streams for URL: https://www.ahaber.com.tr/canli-yayin-minikacocuk.html
:: Found streams: 360p, 576p, worst, best
:: Finding streams for URL: https://www.ahaber.com.tr/canli-yayin-minikago.html
:: Found streams: 360p, 576p, worst, best
:: Finding streams for URL: https://www.ahaber.com.tr/video/canli-yayin
:: Found streams: 288p, 432p, 576p, 864p, worst, best
:: Finding streams for URL: https://www.ahaber.com.tr/video/yasam-videolari/samsunda-sel-sularindan-kacma-ani-kamerada
:: Found streams: 480p, worst, best
:: Finding streams for URL: https://www.anews.com.tr/webtv/live-broadcast
:: Found streams: 240p, 360p, 480p, 720p, worst, best
:: Finding streams for URL: https://www.anews.com.tr/webtv/world/pro-ukraine-militia-says-it-has-captured-russian-soldiers
:: Found streams: 720p, worst, best
:: Finding streams for URL: https://www.apara.com.tr/canli-yayin
:: Found streams: 240p, 360p, 480p, 720p, worst, best
:: Finding streams for URL: https://www.apara.com.tr/video/ekonomide-bugun/bist-100de-kar-satislari-derinlesir-mi
:: Found streams: 720p, worst, best
:: Finding streams for URL: https://www.aspor.com.tr/webtv/canli-yayin
:: Found streams: 240p, 360p, 480p, 864p, worst, best
:: Finding streams for URL: https://www.aspor.com.tr/webtv/galatasaray/galatasaraydan-forma-tanitiminda-fenerbahceye-gonderme
:: Found streams: 576p, worst, best
:: Finding streams for URL: https://www.atv.com.tr/a2tv/canli-yayin
:: Found streams: 240p, 360p, 480p, 720p, worst, best
:: Finding streams for URL: https://www.atv.com.tr/canli-yayin
:: Found streams: 288p, 432p, 864p, 1080p, worst, best
:: Finding streams for URL: https://www.atv.com.tr/kurulus-osman/127-bolum/izle
:: Found streams: 320p, 480p, 720p, 1080p, worst, best
:: Finding streams for URL: https://www.atv.com.tr/webtv/canli-yayin
:: Found streams: 288p, 432p, 864p, 1080p, worst, best
:: Finding streams for URL: https://www.atvavrupa.tv/canli-yayin
:: Found streams: 360p, 576p, worst, best
:: Finding streams for URL: https://www.atvavrupa.tv/diger-program//ozelvideo/izle
:: Found streams: 1080p, worst, best
:: Finding streams for URL: https://www.minikacocuk.com.tr/webtv/canli-yayin
:: Found streams: 360p, 576p, worst, best
:: Finding streams for URL: https://www.minikacocuk.com.tr/webtv/olly/bolum/olly-eylul-tanitim
:: Found streams: 720p, worst, best
:: Finding streams for URL: https://www.minikago.com.tr/webtv/canli-yayin
:: Found streams: 360p, 576p, worst, best
:: Finding streams for URL: https://www.minikago.com.tr/webtv/mondo-yan/bolum/mondo-yan-eylul-tanitim
:: Found streams: 720p, worst, best

closes #5365

@mkbloke mkbloke added the plugin issue A Plugin does not work correctly label Jun 5, 2023
Copy link
Member

@bastimeyer bastimeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for URL in $(grep '^http' t-urls.txt | cut -f 1 -d ' '); do streamlink $URL best; done;

./script/test-plugin-urls.py turkuvaz
...

http://a2tv.com.tr

This should be removed from the tests, because it doesn't redirect to an actual video.

First VOD listed on that redirected site returns an mp4 container instead of an HLS playlist. Since the plugin matches those URLs and since a fix is simple, this should be supported in addition to the live streams. The plugin metadata would also need an update.

$ streamlink -l debug 'https://www.atv.com.tr/a2tv/webtv/a2tv-video/ozelvideo/bir-zamanlar-cukurova-hafta-ici-her-gun-1630da-a2de?id=ba70abb9-b639-46a2-b972-a9210eae87e0'
[cli][debug] OS:         Linux-6.3.4-1-git-x86_64-with-glibc2.37
[cli][debug] Python:     3.11.3
[cli][debug] Streamlink: 5.5.1+39.gde5430b0
[cli][debug] Dependencies:
[cli][debug]  certifi: 2023.5.7
[cli][debug]  isodate: 0.6.1
[cli][debug]  lxml: 4.9.2
[cli][debug]  pycountry: 22.3.5
[cli][debug]  pycryptodome: 3.18.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.31.0
[cli][debug]  urllib3: 2.0.2
[cli][debug]  websocket-client: 1.5.2
[cli][debug] Arguments:
[cli][debug]  url=https://www.atv.com.tr/a2tv/webtv/a2tv-video/ozelvideo/bir-zamanlar-cukurova-hafta-ici-her-gun-1630da-a2de?id=ba70abb9-b639-46a2-b972-a9210eae87e0
[cli][debug]  --loglevel=debug
[cli][debug]  --player=mpv
[cli][info] Found matching plugin turkuvaz for URL https://www.atv.com.tr/a2tv/webtv/a2tv-video/ozelvideo/bir-zamanlar-cukurova-hafta-ici-her-gun-1630da-a2de?id=ba70abb9-b639-46a2-b972-a9210eae87e0
[plugins.turkuvaz][debug] video_id=ba270abb9nb63946ia2kb972a921-0eae87e0
[plugins.turkuvaz][debug] website_id=0fe2a405-8afa-4238-b429-e5f96aec3a5c
[plugins.turkuvaz][debug] hls_url=https://atv-vod.ercdn.net/video/2023/03/ba70abb9-b639-46a2-b972-a9210eae87e0_0400.mp4
[plugins.turkuvaz][debug] secure_hls_url=https://atv-vod.ercdn.net/video/2023/03/ba70abb9-b639-46a2-b972-a9210eae87e0_0400.mp4?st=oTX3NKvGBWO0c07Jfor3nQ&e=1685973444
[utils.l10n][debug] Language code: en_US
[stream.hls_playlist][warning] Malformed HLS Playlist. Expected #EXTM3U, but got  ftypiso...
error: Failed to parse playlist: Missing #EXTM3U header

Sending a HEAD request returns the correct Content-Type header.

@mkbloke
Copy link
Member Author

mkbloke commented Jun 6, 2023

./script/test-plugin-urls.py turkuvaz
...

Thanks, I'd forgotten about that.

First VOD listed on that redirected site returns an mp4 container instead of an HLS playlist. Since the plugin matches those URLs and since a fix is simple, this should be supported in addition to the live streams. The plugin metadata would also need an update.
...
Sending a HEAD request returns the correct Content-Type header.

My bad - I tested some non-video pages, but not VOD pages. :-/

I did go the route you suggested and got it working, but then I decided to go all-in, which also turned out to be very simple, by just using .video.VideoSmilUrl instead of .video.VideoUrl.

Added id and title metadata.

@mkbloke mkbloke force-pushed the turkuvaz branch 2 times, most recently from a87ab95 to c0d010f Compare June 6, 2023 22:28
@bastimeyer bastimeyer merged commit 4215da3 into streamlink:master Jun 7, 2023
@mkbloke mkbloke deleted the turkuvaz branch June 7, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin issue A Plugin does not work correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plugins.turkuvaz: URLs outdated
2 participants