-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
plugins.dogan: find direct HLS URL #5299
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
plugins.dogan: find direct HLS URL #5299
Conversation
@stulluk please check. Install from the branch of this PR or side-load the plugin changes https://streamlink.github.io/install.html#pypi-package-and-source-code |
@bastimeyer thank you very much. I confirm that it now can display LIVE on KanalD. However, due to my lack of knowledge, I can't find why it can't play the URL via MPV or VLC by using "--stream-url". See below: stulluk ~/streamlink $ git clone https://github.com/bastimeyer/streamlink/
Cloning into 'streamlink'...
remote: Enumerating objects: 32604, done.
remote: Counting objects: 100% (375/375), done.
remote: Compressing objects: 100% (222/222), done.
remote: Total 32604 (delta 188), reused 312 (delta 153), pack-reused 32229
Receiving objects: 100% (32604/32604), 37.58 MiB | 7.09 MiB/s, done.
Resolving deltas: 100% (21594/21594), done.
stulluk ~/streamlink $
stulluk ~/streamlink $ cd streamlink/
stulluk ~/streamlink/streamlink (master) $
stulluk ~/streamlink/streamlink (master) $ git checkout plugins/dogan/find-direct-hls-url
Branch 'plugins/dogan/find-direct-hls-url' set up to track remote branch 'plugins/dogan/find-direct-hls-url' from 'origin'.
Switched to a new branch 'plugins/dogan/find-direct-hls-url'
stulluk ~/streamlink/streamlink (plugins/dogan/find-direct-hls-url) $
stulluk ~/streamlink/streamlink (plugins/dogan/find-direct-hls-url) $ mkdir -p ~/.local/share/streamlink/plugins
stulluk ~/streamlink/streamlink (plugins/dogan/find-direct-hls-url) $ cp src/streamlink/plugins/dogan.py ~/.local/share/streamlink/plugins/
stulluk ~/streamlink/streamlink (plugins/dogan/find-direct-hls-url) $ streamlink https://www.kanald.com.tr/canli-yayin
[cli][info] Found matching plugin dogan for URL https://www.kanald.com.tr/canli-yayin
Available streams: 360p (worst), 480p, 720p, 1080p (best)
stulluk ~/streamlink/streamlink (plugins/dogan/find-direct-hls-url) $ streamlink https://www.kanald.com.tr/canli-yayin 720p
[cli][info] Found matching plugin dogan for URL https://www.kanald.com.tr/canli-yayin
[cli][info] Available streams: 360p (worst), 480p, 720p, 1080p (best)
[cli][info] Opening stream: 720p (hls)
[cli][info] Starting player: /usr/bin/vlc
[cli][info] Player closed
[cli][info] Stream ended
[cli][info] Closing currently open stream...
stulluk ~/streamlink/streamlink (plugins/dogan/find-direct-hls-url) $ streamlink https://www.kanald.com.tr/canli-yayin 720p --stream-url
https://demiroren.daioncdn.net/kanald/kanald_720p.m3u8?&sid=5bqmdtbknpjj&app=da2109ea-5dfe-4107-89ab-23593336ed61&ce=3
stulluk ~/streamlink/streamlink (plugins/dogan/find-direct-hls-url) $ mpv https://demiroren.daioncdn.net/kanald/kanald_720p.m3u8?&sid=5bqmdtbknpjj&app=da2109ea-5dfe-4107-89ab-23593336ed61&ce=3
[1] 39332
[2] 39333
[3] 39334
[2]- Done sid=5bqmdtbknpjj
[3]+ Done app=da2109ea-5dfe-4107-89ab-23593336ed61
stulluk ~/streamlink/streamlink (plugins/dogan/find-direct-hls-url) $ [ffmpeg] https: HTTP error 404 Not Found
Failed to open https://demiroren.daioncdn.net/kanald/kanald_720p.m3u8?.
[ytdl_hook] ERROR: [generic] None: Unable to download webpage: HTTP Error 404: Not Found (caused by <HTTPError 404: 'Not Found'>); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
[ytdl_hook] youtube-dl failed: unexpected error occurred
Exiting... (Errors when loading file)
[1]+ Exit 2 mpv https://demiroren.daioncdn.net/kanald/kanald_720p.m3u8?
stulluk ~/streamlink/streamlink (plugins/dogan/find-direct-hls-url) $
stulluk ~/streamlink/streamlink (plugins/dogan/find-direct-hls-url) $ vlc https://demiroren.daioncdn.net/kanald/kanald_720p.m3u8?&sid=5bqmdtbknpjj&app=da2109ea-5dfe-4107-89ab-23593336ed61&ce=3
[1] 39358
[2] 39359
[3] 39360
VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
[2]- Done sid=5bqmdtbknpjj
[3]+ Done app=da2109ea-5dfe-4107-89ab-23593336ed61
stulluk ~/streamlink/streamlink (plugins/dogan/find-direct-hls-url) $ [0000564b00fc8640] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007fde74001680] access stream error: HTTP 404 error
[00007fde74001680] http stream error: local stream 1 error: Cancellation (0x8)
QObject::~QObject: Timers cannot be stopped from another thread
[1]+ Done vlc https://demiroren.daioncdn.net/kanald/kanald_720p.m3u8?
stulluk ~/streamlink/streamlink (plugins/dogan/find-direct-hls-url) $ Could you please guide me, how can I play direct URL via MPV or VLC ? |
You need to put the streaming URL in single quotes to escape the shell special characters. E.g.:
However, this is often not a good idea because parameters within the URL could change over time and cookies and/or HTTP headers that may be required are not set. These are all things that are taken care of when streaming via the plugin and then piping the video into the player. |
Fixes #5297
The HLS stream URL is read from the
data-url
attribute of the DOM node with thedata-live=true
attribute, so an API query is not needed in this case.Plugin now finds the correct stream URL on kanald. Other sites are not affected by this change.