aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/yt_dlp_plugins/extractor
Commit message (Collapse)AuthorAgeFilesLines
* fix broken time calculation in PersonsIEgarret131724 hours1-1/+1
| | | | | | | | the .broadcast_day_start() was trying to run on the datetime.timedelta, not the RadikoTime that we calculate so it just ERROR: 'datetime.timedelta' object has no attribute 'broadcast_day_start'
* more right-thinking way of handling timefree 30garret2024-11-012-13/+12
| | | | still hardcoded to not work though
* prepare for "timefree 30"garret2024-09-172-2/+13
| | | | | | | | | | | | | https://prtimes.jp/main/html/rd/p/000000032.000007490.html "radiko to launch new service "Timefree 30" this autumn, allows listening to programmes from the past 30 days, no 3-hour time limit" probably can't spoof having the plan, that's fine it might work if you pass cookies of a timefree30 account though, so i'm adapting the time stuff to account for that the plan doesn't exist yet, and i don't know how i would go about detecting it yet, so i'm just hardcoding to False for now
* personsIE: fix API usage that excluded programmes aired todaygarret2024-09-171-1/+1
| | | | | | | | | api ignores end_at_lt, it just sets start_at to the start of the broadcast day the idea was to only get stuff that's actually finished, so only stuff where the end is before now with start_at it'll get ongoing stuff as well, but that's better than not getting the day at all lol
* remove self._region and self._user variablesgarret2024-08-261-18/+13
| | | | | | | | | region wasnt used at all we can make the token stuff into a dict and include the user as well ...which is what i was already doing in the cache one day i want to change the cache format to use better var names but i will deal with that later
* update timefree testsgarret2024-08-111-14/+14
|
* get rid of unnecessary "else"s (+ fix indentation)garret2024-08-111-10/+10
|
* fix RadikoSiteTime test (forgot)garret2024-08-111-1/+1
| | | | | changed func in eb94441420845970d48fe7b4e30cc5eed78ac95a , forgot to change the test also
* persons: only check the extractor arg oncegarret2024-08-111-3/+3
|
* construct the chapter API url properly (not stringmashing)garret2024-08-051-4/+5
|
* add tests for RadikoPersonIEgarret2024-08-051-0/+14
|
* add extractor arg to filter for "key station only"garret2024-08-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | Programmes that air on a network of stations have an originating station- a "key" station. e.g. for all night nippon the key station is ニッポン放送 (LFR) radiko's new APIs include a key_station field. I'd only seen such a field in the mobile-web site until now, so I haven't been able do anything with it. But now the PC website's gotten this "persons" API, so I can. this arg is currently only useful for the new "persons" urls, but i suspect it might become more useful as time goes on... example usage: you give the url for the host of a networked show, the default will download from every station (probably not what you want) but if you specify key-station-only, then you get just one download from the originating station i may add a "preference" argument at some point, for if you want it from a specific non-key station, but not right now
* add support for https://radiko.jp/persons/ URLsgarret2024-08-051-0/+38
| | | | | | | | | | | | | | | | | | | those urls give a bio and pic of the person, and recently they've started giving a list of all the programmes that person's appeared in as well. the API is a bit annoying, you have to specify a start and end time to search between, so i had to work out the logic for "everything currently on timefree" also, the site doesn't use the "end_at_lt" parameter, only start_at_lt i tried it in the url on the offchance it would work and save a bit of logic it did so i will keep it, but it probably stands out a quite a bit, idk if the mobile apps use this, or with the end_at_lt parameter the only playlist details I can provide are the ID. There is an API for the actual details, but that's an extra request, and it's protobuf.
* set the ie_key used by extractor_args to "rajiko"garret2024-08-051-1/+1
| | | | | so just the one --extractor-args incantation can be used for both live and timefree (--extractor-args "rajiko:device=pc_html5")
* change names of RadikoTime functions so that datetime is the "default"garret2024-08-052-5/+9
| | | | generally we should work in datetimes, the strings should be the "special" ones
* don't inherit from RadikoBaseIE when not neededgarret2024-08-051-3/+3
|
* fix StationButton regex to allow for http:/wwww. like the othersgarret2024-08-031-1/+1
|
* update + format testsgarret2024-08-031-173/+130
| | | | | | | | | | all tests passed as of Sat, 03 Aug 2024 06:44:00 +0100 updated to present day where necessary rearranged the dicts to make them easier to read + modify 'single quotes' -> "double quotes" (including some other bits i saw along the way) got rid of most of the timefree tests, since the time handling is tested externally now the station websites stopped using the stationbutton (or started rendering it with javascript) so now cocolo is the only webpage test
* update _ANDROID_VERSIONS source commentgarret2024-07-091-1/+1
| | | | the link wasnt dead after all
* clean up whitespace in coordinate dictgarret2024-07-091-8/+8
|
* add "mobile" as a possibility for x-radiko-connectiongarret2024-07-091-1/+1
|
* 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-072-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-102-33/+14
| | | | | | | | | | | 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-252-15/+12
| | | | mostly whitespace changes
* print generated gps coords for debugginggarret2023-10-241-1/+3
|
* fix broadcast day stuffgarret2023-10-131-7/+14
| | | | | | deduped code for working it out also fixed bug in broadcast_day_end where it shifted forward by a day, but didn't also set the time to 5am
* ShareTime: handle day out of range for monthgarret2023-10-131-3/+9
| | | | | | | | | the site will accept this so we have to as well i should probably try and handle this in SiteTime but cant be fucked right now iirc the site just blanks out if the day is out of range so the datetime exception matches the site's behaviour 👍
* fix executable permsgarret2023-10-132-0/+1
| | | | | 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-102-1/+10
| | | | | | | | | | | | | 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-242-56/+142
| | | | | now only one thing gets passed around and it has most everything we need closes #11
* update testsgarret2023-08-241-84/+94
|