aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/yt_dlp_plugins/extractor/radiko.py
Commit message (Collapse)AuthorAgeFilesLines
* make variable names clearer in token negotiation bitgarret2024-07-091-11/+11
|
* format some dicts a bit nicergarret2024-07-091-2/+8
|
* load key from a file with pkgutilgarret2024-07-071-285/+4
| | | | | | | | | | | | | | | | | | | | | | wanted to do this before, but per comment: the official docs led me to believe that importlib_resources was the only way to do it, and that the thing i was trying to do wasn't supported in some python versions so i put it off to one side for later later came (now), and i tried to implement it with importlib.resources didn't work, i looked it up and found this stackoverflow post https://stackoverflow.com/a/58941536 and the second answer, using pkgutil (not importlib.resources), just worked and the syntax/api seems much nicer as well have tested with pip yt-dlp + raw directory plugin, and binary yt-dlp + .whl plugin also on windows, with binary+whl both worked, amazing success! so pkgutil seems like the way to go i also updated the build thing to include .bin files in the extractor dir
* set the station's uploader_idgarret2024-06-071-0/+1
| | | | parity with yt-dlp proper
* arrange station metadata dict more logicallygarret2024-06-071-4/+7
|
* sort out package "building" and metadatav1.0garret2024-04-021-0/+2
|
* improve report-requesting messagegarret2024-03-061-1/+4
| | | | now links to the actual issue page and prints info useful for debugging
* remove dependency on secretsgarret2024-03-061-3/+2
| | | | | it does not need to be cryptographically strong only using token_hex for convenience
* make random info generator less hackygarret2024-03-061-47/+18
| | | | | | | | | | also fixed a rather embarrassing bug the generated user agent was, for example: Dalvik/2.1.0 (Linux; U; Android {'sdk': '27', 'builds': ['5794017', '6107733', '6037697']};SOV36/6107733) because i put the wrong variable name in the fstring thats alright its only been sending botched identification for its entire existence(!)
* support live url shorthandgarret2024-02-021-3/+6
| | | | | makes it a bit easier to use in the cli since you don't need to 'quote' for the #!
* reject ffmpeg-incompatible formats for live as wellgarret2024-01-051-10/+12
| | | | there is a live format that also doesn't work
* support downloading as-live formatsgarret2024-01-051-1/+20
| | | | closes #18
* make time classes inherit from datetime.datetimegarret2023-11-101-1/+1
| | | | | | | | | | | so now it's just datetime.datetime with custom input and a few new funcs instead of actually having a datetime.datetime internally and jankily kind-of-exposing it doesn't really affect things currently, but it makes something i want to do possible (and it's generally just the better way of doing it) Co-Authored-By: 9382 <omnomaidan@gmail.com>
* add notes about meaning of the url parametersgarret2023-10-291-2/+2
|
* update live testsgarret2023-10-251-12/+14
| | | | | housou daigaku is going away soon, so switching to radio nikkei https://www.ouj.ac.jp/news/2023/information/5-32-2.html
* minor housekeepinggarret2023-10-251-14/+12
| | | | mostly whitespace changes
* print generated gps coords for debugginggarret2023-10-241-1/+3
|
* fix executable permsgarret2023-10-131-0/+0
| | | | | extractor shouldnt be executable time thing should so i can test it easier
* add extractor arg for stream devicegarret2023-10-011-3/+3
| | | | closes #17
* Make token cache check less dumbgarret2023-09-281-5/+3
|
* fix id for station info downloadgarret2023-09-261-1/+1
|
* Cache station metadata for a daygarret2023-09-251-15/+25
| | | | | | | | | | | Station metadata changes extremely rarely, if ever, so it seems awfully silly to keep downloading the exact same metadata every time we extract. Wastes requests, wastes time (300ms round trip for me) This commit makes it so station metadata is cached for a day, and cached data is used in place of downloaded metadata when available. Closes #16
* check end of broadcast day, not end of air timegarret2023-09-101-1/+2
| | | | | | | | | | | | | The old behaviour assumed programmes were deleted precisely a week after their end time. This isn't actually the case though, as long as it's within a week of the _broadcast day_, the site will let you. This lead to the extractor bailing out (Programme is no longer available) when in fact the programme was still playable on the site. The fix uses the same logic as RadikoTime.broadcast_day to find the broadcast day (TODO: one func for both?), then sets the time to 05:00:00 the next day - i.e. the start of a new broadcast day.
* add debug message for station not foundgarret2023-09-081-0/+1
|
* don't generate info twicegarret2023-09-081-1/+1
|
* Migrate to unified time handler thinggarret2023-08-241-56/+28
| | | | | now only one thing gets passed around and it has most everything we need closes #11
* update testsgarret2023-08-241-84/+94
|
* bail sooner when programme is unavailablegarret2023-08-241-18/+5
| | | | ie dont do the dumb noformats vars, just raise the message there and then
* Add timefree availability checkgarret2023-08-151-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | afaict nhk doesn't have timefree, and it says as much on the programme pages The download doesn't fail though, you just get a loop of elevator music and an apology that it's not available (lasting the duration of the programme) from tsDetail.js tsInNg = playable in the area tsOutNg = playable outside the area (maybe - just a guess really, but seems to line up) outside station area + playable in area + not playable outside = not available in your area outside station area + not playable in area + not playable outside area = not available on timefree inside station area + not playable in area = not available on timefree we'll always be in the station area, so we only have to check tsInNg included a message about NHK Radiru because so far i've only seen NHK programmes be unavailable one day i should make the programme_meta func return a dict or something instead of just adding stuff on the end ad infinitum closes #15
* encode b64 partialkey as asciigarret2023-07-291-1/+1
| | | | | | | | | fixes #14 new headers thing made b'bytes' into "b'bytes'", instead of just 'bytes' so it sent eg `X-Radiko-Partialkey: b'9lOaAg+2TZRSF+IsiDnUJg=='` likely a fix for this upstream soon, but will do the sensible thing and make it ascii myself https://discord.com/channels/807245652072857610/1112613156934668338/1134879336512634880 (yt-dlp discord)
* add debug incantations to check for proper key offset/lengthgarret2023-07-291-0/+5
|
* switch from Response.info() to Response.headersgarret2023-07-291-1/+1
| | | | | ERROR: Response.info() is deprecated, use Response.headers see #14
* update search testsgarret2023-07-151-10/+10
|
* handle multi-paged search resultsgarret2023-07-151-4/+13
| | | | fixes #13
* remove unused functiongarret2023-07-131-4/+0
|
* fix wrong comparison in ShareIEgarret2023-07-051-1/+1
|
* add station as uploadergarret2023-07-041-0/+1
| | | | so when embedding it gets tagged as the artist
* get better artist name in tracklistgarret2023-07-041-5/+9
|
* add tracklist chapters extractiongarret2023-07-041-0/+14
| | | | closes #6
* add Station Button embed extractorgarret2023-06-271-0/+71
| | | | closes #4
* loop through search results the old-fashioned waygarret2023-06-191-7/+2
| | | | not smort enough for traverse_obj
* streamline xml parsing with XPathsgarret2023-06-191-38/+38
|
* update testsgarret2023-06-191-28/+28
| | | | one of these days i should look in to a way to do this automatically
* add SearchIE testsgarret2023-06-131-0/+25
|
* add playlist id to SearchIEgarret2023-06-131-0/+8
|
* add ShareIE testgarret2023-06-131-0/+24
|
* handle 29-hour time in ShareIEgarret2023-06-131-0/+10
|
* add history to search regexgarret2023-06-131-1/+1
|
* relax station ID regexgarret2023-06-091-2/+2
| | | | FM_OKINAWA, FM_OITA
* shitgarret2023-06-041-1/+1
|