I had a Perl script which I’d built from reverse-engineering the pages on the Apple podcasts page so I could easily run a batch job to download new episodes overnight. But since they changed the pages I can’t see an obvious way to extract the MP3s’ URLs so I can download them.
Looking through the repos, there are GUI clients such as gnome-podcasts that can get the files, but I can’t find anything I can incorporate into a batch job.
Has anyone found any software to do this?
It is possible the page requires javascript navigation - and if it does you can get away with it using python, beautiful soup and selenium web driver.
A couple of ideas from a quick search download apple podcast using python
omano
12 September 2024 11:25
3
yt-dlp
seems to have the functionality. Probably need the latest commits as I see there is an open issue about it though.
opened 02:45AM - 21 Aug 24 UTC
site-bug
triage
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
- [X] I understand that I will be … **blocked** if I *intentionally* remove or skip any mandatory\* field
### Checklist
- [X] I'm reporting that yt-dlp is broken on a **supported** site
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required
### Region
taiwan
### Provide a description that is worded well enough to be understood
This is the error message I get
→ ./yt-dlp_macos "https://podcasts.apple.com/tw/podcast/ep480/id1500839292?i=1000665698691"
[ApplePodcasts] Extracting URL: https://podcasts.apple.com/tw/podcast/ep480/id1500839292?i=1000665698691
[ApplePodcasts] 1000665698691: Downloading webpage
ERROR: 1000665698691: An extractor error has occurred. (caused by StopIteration()); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
this is my version
→ ./yt-dlp_macos -U
Latest version: master@2024.08.19.221301 from yt-dlp/yt-dlp-master-builds
yt-dlp is up to date (master@2024.08.19.221301 from yt-dlp/yt-dlp-master-builds)
Was able to download, stop working all of a sudden recently.
### Provide verbose output that clearly demonstrates the problem
- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below
### Complete Verbose Output
```shell
[debug] Command-line config: ['-vU', 'https://podcasts.apple.com/tw/podcast/ep480/id1500839292?i=1000665698691']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version master@2024.08.19.221301 from yt-dlp/yt-dlp-master-builds [f0bb28504] (darwin_exe)
[debug] Python 3.12.4 (CPython arm64 64bit) - macOS-14.5-arm64-arm-64bit (OpenSSL 3.0.13 30 Jan 2024)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.07.04, curl_cffi-0.7.1, mutagen-1.47.0, requests-2.32.3, sqlite3-3.45.3, urllib3-2.2.2, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1830 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-master-builds/releases/latest
Latest version: master@2024.08.19.221301 from yt-dlp/yt-dlp-master-builds
yt-dlp is up to date (master@2024.08.19.221301 from yt-dlp/yt-dlp-master-builds)
[ApplePodcasts] Extracting URL: https://podcasts.apple.com/tw/podcast/ep480/id1500839292?i=1000665698691
[ApplePodcasts] 1000665698691: Downloading webpage
ERROR: 1000665698691: An extractor error has occurred. (caused by StopIteration()); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
File "yt_dlp/extractor/common.py", line 740, in extract
File "yt_dlp/extractor/applepodcasts.py", line 48, in _real_extract
File "yt_dlp/utils/_utils.py", line 2640, in try_get
File "yt_dlp/utils/_utils.py", line 2631, in try_call
File "yt_dlp/extractor/applepodcasts.py", line 50, in <lambda>
StopIteration
```
yt-dlp:master
← coreywright:ie/applepodcasts/Fix_after_website_rewrite
opened 08:27AM - 02 Sep 24 UTC
**IMPORTANT**: PRs without the template will be CLOSED
### Description of you… r *pull request* and other information
<!--
Explanation of your *pull request* in arbitrary form goes here. Please **make sure the description explains the purpose and effect** of your *pull request* and is worded well enough to be understood. Provide as much **context and examples** as possible
-->
Apple rewrote podcasts.apple.com to turn it into a web app, but in the process eliminated the old JSON data structure used to extract podcast metadata and introduced a new one. Modify the ApplePodcasts info extractor to account for the change in JSON.
Fixes #10809
<details open><summary>Template</summary>
<!--
# PLEASE FOLLOW THE GUIDE BELOW
- You will be asked some questions, please read them **carefully** and answer honestly
- Put an `x` into all the boxes `[ ]` relevant to your *pull request* (like [x])
- Use *Preview* tab to see how your *pull request* will actually look like
-->
### Before submitting a *pull request* make sure you have:
- [X] At least skimmed through [contributing guidelines](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions) including [yt-dlp coding conventions](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#yt-dlp-coding-conventions)
- [X] [Searched](https://github.com/yt-dlp/yt-dlp/search?q=is%3Apr&type=Issues) the bugtracker for similar pull requests
### In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under [Unlicense](http://unlicense.org/). Check all of the following options that apply:
- [X] I am the original author of this code and I am willing to release it under [Unlicense](http://unlicense.org/)
- [ ] I am not the original author of this code but it is in public domain or released under [Unlicense](http://unlicense.org/) (provide reliable evidence)
### What is the purpose of your *pull request*?
- [X] Fix or improvement to an extractor (Make sure to add/update tests)
- [ ] New extractor ([Piracy websites will not be accepted](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#is-the-website-primarily-used-for-piracy))
- [ ] Core bug fix/improvement
- [ ] New feature (It is strongly [recommended to open an issue first](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#adding-new-feature-or-making-overarching-changes))
</details>
That’s handy, as I already have that installed. Thanks.
The issue probably relates to the change they made to the layout which defeated me.
… and grabbing applepodcasts.py from github makes it work!
1 Like
system
Closed
15 September 2024 12:59
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.