aajanki / yle-dl

Download videos from Yle servers
https://aajanki.github.io/yle-dl/index-en.html
GNU General Public License v3.0
302 stars 52 forks source link

"Uusittu" Areena ei toimi yle-dl 20220213 kanssa #304

Closed ExTechOp closed 2 years ago

ExTechOp commented 2 years ago

Areenan ulkonäkö on tänään hieman muuttunut, ja taustatekniikkakin lienee muuttunut siten ettei yle-dl enää toimi?

% yle-dl -V -o "Saamelaisten_suurijuhla(2013).mp4" https://areena.yle.fi/1-2179988

yle-dl 20220213: Download media files from Yle Areena and Elävä Arkisto Copyright (C) 2009-2022 Antti Ajanki antti.ajanki@iki.fi, license: GPLv3 DEBUG: Detected ffmpeg 4.4.2 DEBUG: https://areena.yle.fi/1-2179988 is an Areena URL DEBUG: HTTP GET https://areena.yle.fi/1-2179988 DEBUG: HTTP status code: 200 DEBUG: HTTP response headers: DEBUG: Content-Type: text/html; charset=utf-8 DEBUG: Transfer-Encoding: chunked DEBUG: Connection: keep-alive DEBUG: Date: Thu, 21 Apr 2022 17:55:27 GMT DEBUG: Cache-Control: max-age=60 DEBUG: X-Powered-By: Next.js DEBUG: Content-Encoding: gzip DEBUG: ETag: "2728f-ay9cb1l5V+SeYaAqVh5JrWDDFxc" DEBUG: Vary: Cookie,Accept-Encoding DEBUG: X-Cache: Hit from cloudfront DEBUG: Via: 1.1 b17cf9f4b1a924d2565eea6067d2d532.cloudfront.net (CloudFront) DEBUG: X-Amz-Cf-Pop: HEL51-P1 DEBUG: X-Amz-Cf-Id: 44Vo8Cjar02oo4EVcWKSQRYakQ5sB8ma6fB2dHjnE6i7c99G0FMZOA== DEBUG: Age: 19 DEBUG: not a playlist DEBUG: HTTP GET https://player.api.yle.fi/v1/preview/1-2179988.json?language=fin&ssl=true&countryCode=FI&host=areenaylefi&app_id=player_static_prod&app_key=8930d72170e48303cf5f3867780d549b DEBUG: HTTP status code: 200 DEBUG: HTTP response headers: DEBUG: Content-Type: application/json;charset=utf-8 DEBUG: Transfer-Encoding: chunked DEBUG: Connection: keep-alive DEBUG: Date: Thu, 21 Apr 2022 17:55:27 GMT DEBUG: Server: nginx/1.21.6 DEBUG: Cache-Control: max-age=30 DEBUG: Access-Control-Allow-Methods: GET, HEAD, OPTIONS DEBUG: Access-Control-Allow-Origin: https://areena.yle.fi DEBUG: Access-Control-Allow-Credentials: true DEBUG: Content-Encoding: gzip DEBUG: Vary: Accept-Encoding DEBUG: X-Cache: Hit from cloudfront DEBUG: Via: 1.1 11e8f0c61352b0b7123fef57178c7f98.cloudfront.net (CloudFront) DEBUG: X-Amz-Cf-Pop: HEL50-C2 DEBUG: X-Amz-Cf-Id: kzcr-U8dGNk1VMVISVWn11F0HeFjTRZqUvTLk_LhqWDvluifyHvazg== DEBUG: Age: 19 DEBUG: preview data: { "meta": { "id": "1-2179988" }, "data": { "ongoing_ondemand": { "description": { "fin": "Konfirmaatio on monelle el\u00e4m\u00e4n suurimpia juhlia. Koutokeinossa pidett\u00e4v\u00e4\u00e4n juhlaan valmistaudutaan huolellisesti: tehd\u00e4\u00e4n uudet vaatteet, teetet\u00e4\u00e4n korut ja laitetaan ruokaa 150 vieraalle. Toimittaja Elisabeth Morney, 2013.", "swe": "Den samiska konfirmationen i Kautokeino \u00e4r en av livets st\u00f6rsta fester. Mycket ska f\u00f6rberedas; nya kl\u00e4der, silversmycken och traditionell mat f\u00f6r 150 g\u00e4ster. Redakt\u00f6r: Elisabeth Morney, 2013." }, "subtitles": [ { "lang": "fi", "type": "translation", "uri": "https://cdnapi-legacy.kaltura.com/api_v3/index.php/service/caption_captionAsset/action/serve/captionAssetId/1_sjgx3un3/ks/MjdmNTlmMDBjNjVjYWY2MzI2YTJhNWQ4NTAzMDQ3MGRhNjVjNWQ5ZnwxOTU1MDMxOzE5NTUwMzE7MTY1MDU4NTMyNzswOzExOTE0O292cEB5bGUuZmk7ZG93bmxvYWQ6MV84Mm91dnMxag==" }, { "lang": "sv", "type": "translation", "uri": "https://cdnapi-legacy.kaltura.com/api_v3/index.php/service/caption_captionAsset/action/serve/captionAssetId/1_plb1e4lf/ks/OWRkY2MwNjY0NDI3YTgyNzQ1M2IxNTgyYzZiZWZmZjlkZDllMTU3MnwxOTU1MDMxOzE5NTUwMzE7MTY1MDU4NTMyNzswOzIxNjgyO292cEB5bGUuZmk7ZG93bmxvYWQ6MV84Mm91dnMxag==" }, { "lang": "svh", "type": "hearingimpaired", "uri": "https://cdnapi-legacy.kaltura.com/api_v3/index.php/service/caption_captionAsset/action/serve/captionAssetId/1_mm9jzafh/ks/OTIxZmMwYzQyMzMyNjk2Y2UzNWM1YzVmZDcxYTYxZmU1MjQ1MmMxMnwxOTU1MDMxOzE5NTUwMzE7MTY1MDU4NTMyNzswOzE4MjgyO292cEB5bGUuZmk7ZG93bmxvYWQ6MV84Mm91dnMxag==" } ], "auto_subtitles": true, "stream_aspect_ratio": "16:9", "multiaudio": false, "media_id": "29-1_82ouvs1j", "series": { "id": "1-3823108", "title": { "fin": "Dok", "swe": "Dok" } }, "program_id": "1-2179988", "dvr_window_in_seconds": 0, "cuepoints": [], "start_time": "2015-02-27T20:00:15.000+02:00", "duration": { "duration_in_seconds": 1715, "h": 0, "m": 0, "s": 1715 }, "next_episode": { "id": "1-2467057", "title": { "fin": "Sota on valheiden aikaa", "swe": "Ett krig \u00e4r en tid av l\u00f6gner" } }, "is_content_protected": true, "title": { "fin": "Saamelaisten suuri juhla", "swe": "Den stora festen" }, "region": "World", "content_type": "VideoObject", "kaltura": { "id": "1_82ouvs1j" }, "is_areena_visible": true, "adobe": { "category": "asiaohjelmat", "yle_country_code": "FI", "yle_title": "dok", "fp_clnr": "20001", "yle_service_id": "yle-areena", "yle_ss_ohjusid": "1-2179988", "yle_ss_prodnumber": "65666011000", "yle_genreid": "3.1", "yle_ss_mediaid": "29-1_82ouvs1j", "ns_st_ep": "20150227", "ns_st_el": "1715000", "ns_st_dt": "20150227", "yle_id": "1-2179988", "ns_st_st": "vain_areenassa", "fp_ch": "fp198", "yle_language": "sv", "ns_st_ty": "vod", "countername": "asiaohjelmat.vod.vain_areenassa.dok", "yle_stickytitle": "saamelaisten suuri juhla", "yle_metrics_api_data_version": "v2.1", "fp_bd": "20150227", "yle_dayssincepublish": "2610", "yle_truelength": "1715000", "fp_prod_id": "na", "fp_ty": "video_tv_program", "content_type": "vod", "ns_st_pr": "asiaohjelmat.vod.vain_areenassa.dok", "yle_publication_event_id": "4-4029702", "ns_st_ge": "asiaohjelmat/lifestyle", "yle_media_type": "TVContent", "ns_st_cl": "1715000", "yle_publication_event_type": "OnDemandPublication", "ns_st_ci": "16-1-0798531", "ns_st_pl": "asiaohjelmat.vod.vain_areenassa.dok.20150227", "yle_alternativeid": "16-1-0798531", "yle_media_id": "29-1_82ouvs1j" }, "image": { "id": "13-1-2179988", "version": 1649470250 }, "service_id": "yle-areena", "manifest_url": "https://cdnapi-legacy.kaltura.com/p/1955031/sp/0/playManifest/entryId/1_82ouvs1j/format/applehttp/referrer/bW9iaWxlLnlsZS5maQ==/protocol/https/1_82ouvs1j.m3u8?tags=mbr", "content_rating": { "age_restriction": null, "reasons": null } } } } DEBUG: HTTP GET https://areena.yle.fi/api/programs/v1/id/1-2179988.json?app_id=areena_web_frontend_prod&app_key=4622a8f8505bb056c956832a70c105d4 DEBUG: HTTP status code: 404 DEBUG: HTTP response headers: DEBUG: Content-Type: text/html; charset=utf-8 DEBUG: Transfer-Encoding: chunked DEBUG: Connection: keep-alive DEBUG: Date: Thu, 21 Apr 2022 17:55:47 GMT DEBUG: Set-Cookie: yle_selva=16505637470334479738; Domain=.yle.fi; Path=/; Expires=Thu, 31 Dec 2037 23:59:59 GMT DEBUG: Cache-Control: private, max-age=120 DEBUG: X-Frame-Options: DENY DEBUG: X-Content-Type-Options: nosniff DEBUG: ETag: W/"18763-IFMs2lc0/BK04LAvv1Mfs4L9/3w" DEBUG: Content-Encoding: gzip DEBUG: Vary: Accept-Encoding DEBUG: X-Cache: Error from cloudfront DEBUG: Via: 1.1 b17cf9f4b1a924d2565eea6067d2d532.cloudfront.net (CloudFront) DEBUG: X-Amz-Cf-Pop: HEL51-P1 DEBUG: X-Amz-Cf-Id: aIpPYRUKGKsGH9ohLvYLbiLWTGHrcKwnIsp8TIs0Fy_2pZm1flpNrA== Traceback (most recent call last): File "/home/otto/bin/yle-dl", line 8, in sys.exit(main()) File "/home/otto/.local/lib/python3.10/site-packages/yledl/yledl.py", line 471, in main res = execute_action(url, action, io, httpclient, title_formatter, File "/home/otto/.local/lib/python3.10/site-packages/yledl/yledl.py", line 289, in execute_action return download_clips(clips(), dl, io, title_formatter, stream_filters) File "/home/otto/.local/lib/python3.10/site-packages/yledl/yledl.py", line 296, in download_clips clips = list(clips) File "/home/otto/.local/lib/python3.10/site-packages/yledl/extractors.py", line 210, in return (self.extract_clip(clipurl, title_formatter, ffprobe) File "/home/otto/.local/lib/python3.10/site-packages/yledl/extractors.py", line 437, in extract_clip program_info = self.program_info_for_pid( File "/home/otto/.local/lib/python3.10/site-packages/yledl/extractors.py", line 628, in program_info_for_pid info = jsonhelpers.load_json(self.program_info_url(pid), self.httpclient) File "/home/otto/.local/lib/python3.10/site-packages/yledl/jsonhelpers.py", line 5, in load_json json_string = httpclient.download_page(url, headers) File "/home/otto/.local/lib/python3.10/site-packages/yledl/http.py", line 45, in download_page response = self.get(url, extra_headers) File "/home/otto/.local/lib/python3.10/site-packages/yledl/http.py", line 92, in get r.raise_for_status() File "/usr/lib/python3.10/site-packages/requests/models.py", line 960, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://areena.yle.fi/api/programs/v1/id/1-2179988.json?app_id=areena_web_frontend_prod&app_key=4622a8f8505bb056c956832a70c105d4

gunnar12 commented 2 years ago

same on widows and old improved code wld be nice with more error handling at same time

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://areena.yle.fi/api/programs/v1/id/

PS IDM downloader 30 day free, works but file name different, obv worst: need to convert ts file to mp4, ffmpeg. to sync aud/vid goes for final video stream link

File "C:\AAA\audio\yle-dl-master\yle-dl-script.py", line 11, in load_entry_point('yle-dl==20210704', 'console_scripts', 'yle-dl')() File "C:\AAA\audio\yle-dl-master\yledl\yledl.py", line 462, in main stream_filters) File "C:\AAA\audio\yle-dl-master\yledl\yledl.py", line 287, in execute_action return download_clips(clips(), dl, io, title_formatter, stream_filters) File "C:\AAA\audio\yle-dl-master\yledl\yledl.py", line 270, in clips title_formatter, io.ffprobe()) File "C:\AAA\audio\yle-dl-master\yledl\extractors.py", line 216, in extract for clipurl in playlist] File "C:\AAA\audio\yle-dl-master\yledl\extractors.py", line 216, in for clipurl in playlist] File "C:\AAA\audio\yle-dl-master\yledl\extractors.py", line 434, in extract_clip pid, clip_url, title_formatter, ffprobe) File "C:\AAA\audio\yle-dl-master\yledl\extractors.py", line 624, in program_info_for_pid info = jsonhelpers.load_json(self.program_info_url(pid), self.httpclient) File "C:\AAA\audio\yle-dl-master\yledl\jsonhelpers.py", line 5, in load_json json_string = httpclient.download_page(url, headers) File "C:\AAA\audio\yle-dl-master\yledl\http.py", line 44, in download_page response = self.get(url, extra_headers) File "C:\AAA\audio\yle-dl-master\yledl\http.py", line 91, in get r.raise_for_status() File "C:\Users\Gunnar\AppData\Roaming\Python\Python37\site-packages\requests-2.26.0-py3.7.egg\requests\mode .py", line 953, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://areena.yle.fi/api/programs/v1/id/ 3411685.json?app_id=areena_web_frontend_prod&app_key=4622a8f8505bb056c956832a70c105d4end_prod&app_key=4622a8f8505bb056c956832a70c105d4

gunnar12 commented 2 years ago

huhu... Areena yhta sekaisin kun maa ja eduskunta

"viela ehdit" niinkuin saddamin nookolaarit ja yle alkumatkalla pohjaan uhkakirjeitten paineen alla

gunnar12 commented 2 years ago

Radio audiokin ei toimi uusimmat (salainen linkki?)

https://areena.yle.fi/audio/ohjelmat/30-490

File "U:\yle-dl21\yle-dl-20210917\yledl\http.py", line 92, in get r.raise_for_status() File "C:\Users\Gunnar\AppData\Roaming\Python\Python37\site-packages\requests- .26.0-py3.7.egg\requests\models.py", line 953, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://are na.yle.fi/api/programs/v1/id/1-61842188.json?app_id=areena_web_frontend_prod&ap _key=4622a8f8505bb056c956832a70c105d4

ernie77 commented 2 years ago

Näyttäisi siltä, että YLE on nyt poistanut rajapintoja käytöstä.

aajanki commented 2 years ago

There's a partial fix on the master branch now.

Most of the regular episodes seem to work again, but playlist pages download only the first episode and the filenames do not include the series name and the episode number anymore.

gunnar12 commented 2 years ago

thanks

heikkijuntunen commented 2 years ago

I tested few times but all attempts of episodes or movies I tried to download were unsuccessful requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://areena.yle.fi/api/programs/v1/id/1-4671765.json?app_id=areena_web_frontend_prod&app_key=4622a8f8505bb056c956832a70c105d4

aajanki commented 2 years ago

@heikkijuntunen, are you sure that you are running yle-dl from the master branch? That error message looks like as if you would still have the old version.

Could it be that you have both the old yle-dl 20220213 and the master branch version installed and that the yle-dl command is defaulting to the old version?

bitterhalt commented 2 years ago

Same problem. I can't download anything: requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://areena.yle.fi/api/programs/v1/id/1-50141093.json?app_id=areena_web_frontend_prod&app_key=4622a8f8505bb056c956832a70c105d4 yle-dl 20220213:

teelmo commented 2 years ago

I can confirm that the version installed from master branch works. On OS X by default it went to ~/.local/bin/ so I had to run ~/.local/bin/yle-dl to override the default Brew installed version.

heikkijuntunen commented 2 years ago

Steps I did were:

  1. checked out yle-dl (latest commit is d4f91a9)
  2. python3 setup.py install --user
  3. $HOME/.local/bin/yle-dl https://areena.yle.fi/1-50799900

and the error message was the one mentioned above

jpalko commented 2 years ago

I tried yesterday the same commit and it worked fine for the same video.

Although I first failed as I had pip installed yle-dl which I then removed and had another go of installing with that commit...

heikkijuntunen commented 2 years ago

Thanks @jpalko - after I did pip3 uninstall yle-dl and then reinstalled everything started to work

aajanki commented 2 years ago

I just released version 20220425. It should be compatible with the latest Areena changes. Also, downloading all episodes of a series is working again, and series name and episode number are properly included in the output filename.

ExTechOp commented 2 years ago

Happy to report the updated version works fine! Thank you once again! 😺

ExTechOp commented 2 years ago

Unfortunately issue #293 still persists with also this new version.

brzd commented 2 years ago

Master branch works for me. I had to uninstall the existing newest version in order for this to work. After that worked as before.

brzd commented 2 years ago

Unfortunately issue #293 still persists with also this new version.

It seems that the structure for this set of episodes is not in series format? Could that be the reason?