Skip to content
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

Support request for antenna.gr #15961

Open
Hackerpcs opened this issue Mar 23, 2018 · 6 comments
Open

Support request for antenna.gr #15961

Hackerpcs opened this issue Mar 23, 2018 · 6 comments

Comments

@Hackerpcs
Copy link

@Hackerpcs Hackerpcs commented Mar 23, 2018

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.03.20.

  • I've verified and I assure that I'm running youtube-dl 2018.03.20

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Site support request (request for adding support for a new site)

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output:

youtube-dl.exe -v https://www.antenna.gr/watch/337261/to-kafe-tis-xaras-epeis-86-
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.antenna.gr/watch/337261/to-kafe-tis-xaras-epeis-86-']
[debug] Encodings: locale cp1253, fs mbcs, out cp737, pref cp1253
[debug] youtube-dl version 2018.03.20
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-90399-ged0e0fe102, ffprobe N-90399-ged0e0fe102, phantomjs 2.1.1
[debug] Proxy map: {'https': 'https://127.0.0.1:3128', 'http': 'http://127.0.0.1:3128', 'ftp': 'ftp://127.0.0.1:3128'}
[generic] to-kafe-tis-xaras-epeis-86-: Requesting header
WARNING: Falling back on generic information extractor.
[generic] to-kafe-tis-xaras-epeis-86-: Downloading webpage
[generic] to-kafe-tis-xaras-epeis-86-: Extracting information
ERROR: Unsupported URL: https://www.antenna.gr/watch/337261/to-kafe-tis-xaras-epeis-86-
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\YoutubeDL.py", line 785, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\extractor\common.py", line 440, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\extractor\generic.py", line 3161, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: https://www.antenna.gr/watch/337261/to-kafe-tis-xaras-epeis-86-
youtube-dl.exe -v https://www.antenna.gr/live
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.antenna.gr/live']
[debug] Encodings: locale cp1253, fs mbcs, out cp737, pref cp1253
[debug] youtube-dl version 2018.03.20
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-90399-ged0e0fe102, ffprobe N-90399-ged0e0fe102, phantomjs 2.1.1
[debug] Proxy map: {'ftp': 'ftp://127.0.0.1:3128', 'https': 'https://127.0.0.1:3128', 'http': 'http://127.0.0.1:3128'}
[generic] live: Requesting header
WARNING: Falling back on generic information extractor.
[generic] live: Downloading webpage
[generic] live: Extracting information
ERROR: Unsupported URL: https://www.antenna.gr/live
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\YoutubeDL.py", line 785, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\extractor\common.py", line 440, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\extractor\generic.py", line 3161, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: https://www.antenna.gr/live

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):


Web TV site of Greek TV station Antenna

@Vangelis66
Copy link

@Vangelis66 Vangelis66 commented Mar 24, 2018

ANT1 Live:

https://glmxantennatvsec-lh.akamaihd.net/i/live_1@536771/master.m3u8

youtube-dl -F "https://glmxantennatvsec-lh.akamaihd.net/i/live_1@536771/master.m3u8" =>

[generic] master: Downloading webpage
[generic] master: Downloading m3u8 information
[info] Available formats for master:
format code  extension  resolution note
896          mp4        1280x720    896k , avc1.77.30, mp4a.40.2
1596-0       mp4        1024x576   1596k , avc1.77.30, mp4a.40.2
1596-1       mp4        1280x720   1596k , avc1.77.30, mp4a.40.2
2596         mp4        1920x1080  2596k , avc1.77.30, mp4a.40.2
3596         mp4        1920x1080  3596k , avc1.77.30, mp4a.40.2 (best)

NB: geo-fencing to non-Greek IPs might apply...

@Hackerpcs
Copy link
Author

@Hackerpcs Hackerpcs commented Mar 24, 2018

It applies always not might, true

It changes, about a month (?) ago it was
https://antglantennatv-lh.akamaihd.net/i/live_1@421307/index_1500_av-b.m3u8

@Hackerpcs
Copy link
Author

@Hackerpcs Hackerpcs commented Nov 13, 2018

@Vangelis66
Hey, can you download on demand videos from here? Even if adding referrer it says 403. Live works though

@Vangelis66
Copy link

@Vangelis66 Vangelis66 commented Nov 13, 2018

@Hackerpcs asked:

can you download on demand videos from here?

Sample full episode URL:

https://www.antenna.gr/watch/1238525/nomads-madagaskari-epeisodio-20

They are employing the bitmovin HTML5 embedded player, HLS streams with NO DRM enabled, which means the site is a good candidate for a yt-dl implementation 😉 ; sadly, they only offer one quality variant, 360p @ 1100kbps 😞 ... From within Greece, the master HLS playlist is identified (URL sniffing) as:

https://antennavodsp-vh.akamaihd.net/i/VODS2/,97941f3b-dd9f-4f17-9596-e17a2d4e0806,.mp4.csmil/master.m3u8?hdnts=st=1542135845~exp=1542139445~acl=/*~hmac=03e0f379daba803d6f9d3b1dac3ed09dbe92704b7169f19197706859cbe220a3

and an incantation like the following succeeds:

youtube-dl --console-title --no-warnings --hls-prefer-native -c --no-part "https://antennavodsp-vh.akamaihd.net/i/VODS2/,97941f3b-dd9f-4f17-9596-e17a2d4e0806,.mp4.csmil/master.m3u8?hdnts=st=1542135845~exp=1542139445~acl=/*~hmac=03e0f379daba803d6f9d3b1dac3ed09dbe92704b7169f19197706859cbe220a3" -o "ANT1_NOMADS-Madagaskari_Ep20_20181111[1238525].mp4"

[generic] *~hmac=03e0f379daba803d6f9d3b1dac3ed09dbe92704b7169f19197706859cbe220a
3: Requesting header
[generic] *~hmac=03e0f379daba803d6f9d3b1dac3ed09dbe92704b7169f19197706859cbe220a
3: Downloading webpage
[generic] *~hmac=03e0f379daba803d6f9d3b1dac3ed09dbe92704b7169f19197706859cbe220a
3: Downloading m3u8 information
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 844
[download] Destination: ANT1_NOMADS-Madagaskari_Ep20_20181111[1238525].mp4
[download]   0.3% of ~1.18GiB at  1.15MiB/s ETA 19:26

Even if adding referrer it says 403

I did not have to use a referer request header in my command 😜 ; my sense is that you are simply being GEO-FENCED! I am assuming you're not inside Greece currently, so do read on...

I fired up my UK VPN and yes, I couldn't get the video to start on the sample page; further investigation reveals that their playlist API URI (which is geo-sensitive) is of the format:
https://www.antenna.gr/templates/data/player?cid=1238525 where 1238525 is the videoID, extractable from the programme's main URL... From a non-Greek IP, the JSON response is:

{
  title: "",
  url: "https://antglvod-vh.akamaihd.net/i/,noGR,.mp4.csmil/master.m3u8",
  thumb: "https://ant1media.azureedge.net/imgHandler/1000/",
  Show: "",
  preRoll: "",
  MidRoll1: "",
  MidRoll2: "",
  MidRoll3: "",
  postRoll: ""
}

which returns a BOGUS (Invalid URL) HLS playlist
https://antglvod-vh.akamaihd.net/i/,noGR,.mp4.csmil/master.m3u8
that corresponds to NO video stream.

Thankfully, the playlist API can be tricked with a X-Forwarded-For request header, using a random Greek IP as X-F-F I made the API return:

{
  title: "NOMADS – ΜΑΔΑΓΑΣΚΑΡΗ – ΕΠΕΙΣΟΔΙΟ 20",
  url: "https://antennavodsp-vh.akamaihd.net/i/VODS2/,97941f3b-dd9f-4f17-9596-e17a2d4e0806,.mp4.csmil/master.m3u8?hdnts=st=1542139140~exp=1542142740~acl=/*~hmac=7b3cd151610ba8cf6da1a7593cdc50b55cae221cad7a2878c9953a9ff9b1dfef",
  thumb: "https://ant1media.azureedge.net/imgHandler/1000/e65484f0-a3e0-4014-9828-53c8ff3f3fc8.jpg",
  Show: "NOMADS - ΜΑΔΑΓΑΣΚΑΡΗ - ΕΠΕΙΣΟΔΙΑ",
  preRoll: "4647",
  MidRoll1: "4648",
  MidRoll2: "4649",
  MidRoll3: "0",
  postRoll: "0"
}

... even though I was on a UK IP; the VALID master HLS playlist is thus:

https://antennavodsp-vh.akamaihd.net/i/VODS2/,97941f3b-dd9f-4f17-9596-e17a2d4e0806,.mp4.csmil/master.m3u8?hdnts=st=1542139140~exp=1542142740~acl=/*~hmac=7b3cd151610ba8cf6da1a7593cdc50b55cae221cad7a2878c9953a9ff9b1dfef

What is even more important is the fact that, at the time of writing, the stream host antennavodsp-vh.akamaihd.net appears to not be geo-fenced, so it should be possible to download the stream from outside of Greece (for the sake of the myriads of Greek expats....) 😉

@remitamine , @dstftw, @yan12125, would one of you consider creating an antenna.gr extractor? It should be pretty straightforward for the ranks of you... 👍

@Hackerpcs

You can use something like

youtube-dl --geo-bypass-country GR "https://www.antenna.gr/templates/data/player?cid=1238525" -o 1238525.json

and then you can parse the downloaded file via your preferred method to grab the .m3u8 from within...

@Hackerpcs
Copy link
Author

@Hackerpcs Hackerpcs commented Nov 13, 2018

Thanks for the write up! I'm not an expat (yet :P), I just hate most of web video players and play everything through mpv. Problem was that I use Video DownloadHelper to grab URLs for ease and it was grabbing
https://antennavodsp-vh.akamaihd.net/i/VODS2/,97941f3b-dd9f-4f17-9596-e17a2d4e0806,.mp4.csmil/index_0_av.m3u8?null=0&hdntl=exp=1542234274~acl=/*~data=hdntl~hmac=foobar
which 403s instead of the correct
https://antennavodsp-vh.akamaihd.net/i/VODS2/,97941f3b-dd9f-4f17-9596-e17a2d4e0806,.mp4.csmil/master.m3u8?hdnts=st=1542147871~exp=1542151471~acl=/*~hmac=foobar

The funny thing with Ant1 is that they live stream in 1080 (low bitrate and buggy but it's 1080) and they upload everything in 360 or 480 in their web tv and YouTube channel

@Vangelis66
Copy link

@Vangelis66 Vangelis66 commented Nov 13, 2018

Problem was that I use Video DownloadHelper to grab URLs for ease

For discovering HLS (master) playlists, there exists a more specialised browser extension:

HLS Stream Detector
https://addons.mozilla.org/el/firefox/addon/hls-stream-detector/versions/?page=1#version-0.4.3
(Legacy-XUL format, compatible with Pale Moon 28.x.x, Basilisk 52, FirefoxESR 52.9.0, SeaMonkey 2.49.4)
The Stream Detector
https://addons.mozilla.org/el/firefox/addon/hls-stream-detector/
(Web Extension format, compatible with Waterfox 56.x.x, Firefox 56.0.x and Fx Quantum >=57.0; adds support for MPEG-DASH and Adobe HDS streams).

This addon has never betrayed me; problem is that often times the tokens on found manifests expire too soon (< 5 sec) for them to be manually fed to yt-dl; and, of course, on several occasions you have to provide additional request headers for the download to start...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.