Skip to content

plugins.dogan: rewrite and fix plugin #5053

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
Dec 30, 2022

Conversation

bastimeyer
Copy link
Member

  • Update and split up URL matchers
  • Use XPath for finding content IDs
  • Fix and update API URLs and validation schemas
  • Remove nesting and simplify

Closes #5052

The plugin requires a full rewrite and cleanup. The current implementation is pretty old and really, really messy and bad.
@fenopa please check.

The URLs listed in the plugin matcher tests should all work, but it's possible that I missed some URLs not listed in the tests.

$ echo -e "from tests.plugins.test_dogan import TestPluginCanHandleUrlDogan as test\nfor item in test.should_match: print(item)" \
  | python \
  | xargs -P1 -n1 streamlink
[cli][info] Found matching plugin dogan for URL https://www.cnnturk.com/canli-yayin
Available streams: 410k (worst), 570k, 850k, 1100k, 1400k (best)
[cli][info] Found matching plugin dogan for URL https://www.cnnturk.com/action/embedvideo/5fa56d065cf3b018a8dd0bbc
Available streams: 300k (worst), 750k, 1000k, 1200k, 1800k, 2800k (best)
[cli][info] Found matching plugin dogan for URL https://www.cnnturk.com/tv-cnn-turk/belgeseller/bir-zamanlar/bir-zamanlar-90lar-belgeseli
Available streams: 300k (worst), 750k, 1000k, 1200k, 1800k, 2800k (best)
[cli][info] Found matching plugin dogan for URL https://www.cnnturk.com/video/turkiye/polis-otomobiliyle-tur-atan-sahisla-ilgili-islem-baslatildi-video
Available streams: 300k (worst), 750k, 1000k, 1200k, 1800k, 2800k (best)
[cli][info] Found matching plugin dogan for URL https://www.dreamturk.com.tr/canli-yayin-izle
Available streams: 330k (worst), 490k, 780k, 1000k, 1600k (best)
[cli][info] Found matching plugin dogan for URL https://www.dreamturk.com.tr/dream-turk-ozel/radyo-d/ilyas-yalcintas-radyo-dnin-konugu-oldu
Available streams: 300k (worst), 750k, 1000k, 1200k, 1800k, 2800k (best)
[cli][info] Found matching plugin dogan for URL https://www.dreamturk.com.tr/programlar/dream-10
Available streams: 750k (worst), 1200k, 1800k, 2800k (best)
[cli][info] Found matching plugin dogan for URL https://www.dreamtv.com.tr/dream-ozel/konserler/acik-sahne-dream-ozel
Available streams: 300k (worst), 750k, 1000k, 1200k, 1800k, 2800k (best)
[cli][info] Found matching plugin dogan for URL https://www.teve2.com.tr/canli-yayin
Available streams: 330k (worst), 490k, 780k, 1000k, 1300k (best)
[cli][info] Found matching plugin dogan for URL https://www.teve2.com.tr/diziler/guncel/oyle-bir-gecer-zaman-ki/bolumler/oyle-bir-gecer-zaman-ki-1-bolum
Available streams: 350k (worst), 750k, 1000k, 1200k, 1800k, 2800k (best)
[cli][info] Found matching plugin dogan for URL https://www.teve2.com.tr/embed/55f6d5b8402011f264ec7f64
Available streams: 750k (worst), 1200k, 1800k, 2800k (best)
[cli][info] Found matching plugin dogan for URL https://www.teve2.com.tr/filmler/guncel/yasamak-guzel-sey
Available streams: 750k (worst), 1200k, 1800k, 2800k (best)
[cli][info] Found matching plugin dogan for URL https://www.teve2.com.tr/programlar/guncel/kelime-oyunu/bolumler/kelime-oyunu-800-bolum-19-12-2020
Available streams: 750k (worst), 1200k, 1800k, 2800k (best)
[cli][info] Found matching plugin dogan for URL https://www.kanald.com.tr/canli-yayin
Available streams: 360p (worst), 720p (best)
[cli][info] Found matching plugin dogan for URL https://www.kanald.com.tr/sadakatsiz/fragmanlar/sadakatsiz-10-bolum-fragmani
Available streams: 750k (worst), 1200k, 1800k, 2800k (best)

@bastimeyer bastimeyer added the plugin issue A Plugin does not work correctly label Dec 29, 2022
@fenopa
Copy link
Contributor

fenopa commented Dec 30, 2022

Thank you for taking your time to re-write it. I checked all the link types I could. All are working except this type of link from kanald: https://www.kanald.com.tr/embed/5fda41a8ebc8302048167df6

Because its "player-container" id also includes the data id I think:
<div id="player-container-5fda41a8ebc8302048167df6" class="player-container" data-id="5fda41a8ebc8302048167df6"

- Update and split up URL matchers
- Use XPath for finding content IDs
- Fix and update API URLs and validation schemas
- Remove nesting and simplify
@bastimeyer bastimeyer force-pushed the plugins/dogan/rewrite branch from 2f30ef3 to 04bf4ba Compare December 30, 2022 08:28
@bastimeyer bastimeyer merged commit d695e40 into streamlink:master Dec 30, 2022
@bastimeyer bastimeyer deleted the plugins/dogan/rewrite branch December 30, 2022 15:59
Billy2011 added a commit to Billy2011/streamlink-27 that referenced this pull request Jan 6, 2023
- Update and split up URL matchers
- Use XPath for finding content IDs
- Fix and update API URLs and validation schemas
- Remove nesting and simplify
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.

2 participants