brtmr / podfox Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
The result of podfox feeds
, I did nothing but just adding a feed after installing podfox and configuring the json file.
$ podfox feeds
title | shortname
================================================================================
Traceback (most recent call last):
File "/home/chz/anaconda3/envs/podfox/bin/podfox", line 8, in <module>
sys.exit(main())
File "/home/chz/anaconda3/envs/podfox/lib/python3.8/site-packages/podfox/__init__.py", line 303, in main
pretty_print_feeds(available_feeds())
File "/home/chz/anaconda3/envs/podfox/lib/python3.8/site-packages/podfox/__init__.py", line 268, in pretty_print_feeds
dl = '' if feed['episodes'][0]['downloaded'] else '*'
IndexError: list index out of rang
UPDATE:
It turns out, podfix failed to parse the feed link. the feed.json file in my shortname directory is only a few lines.
I tried the feed link in your README, it works OK, so why podfox failed to pasrse my feed link(https://aezfm.meldingcloud.com/rss/program/11)?
Any plans for an upgrade to support feedparser > 5.2.1 ?
Collecting feedparser Downloading feedparser-6.0.2-py3-none-any.whl (80 kB) |████████████████████████████████| 80 kB 2.9 MB/s Collecting sgmllib3k Downloading sgmllib3k-1.0.0.tar.gz (5.8 kB) Using legacy setup.py install for sgmllib3k, since package 'wheel' is not installed. ERROR: podfox 0.1.2 has requirement feedparser==5.2.1, but you'll have feedparser 6.0.2 which is incompatible. Installing collected packages: sgmllib3k, feedparser Running setup.py install for sgmllib3k ... done Attempting uninstall: feedparser Found existing installation: feedparser 5.2.1 Uninstalling feedparser-5.2.1: Successfully uninstalled feedparser-5.2.1 Successfully installed feedparser-6.0.2 sgmllib3k-1.0.0
Feedparser 5.2.1 have issues with python3.9
Traceback (most recent call last): File "/home/x/podfox_env/bin/podfox", line 5, in <module> from podfox.__init__ import main File "/home/x/podfox_env/lib/python3.9/site-packages/podfox/__init__.py", line 25, in <module> import feedparser File "/home/x/podfox_env/lib/python3.9/site-packages/feedparser.py", line 93, in <module> _base64decode = getattr(base64, 'decodebytes', base64.decodestring) AttributeError: module 'base64' has no attribute 'decodestring'
Podcasts should be downloaded concurrently, so that slow servers do not slow the downloading down.
I have an Asustor NAS, model AS1002T, kind of old. Last week Python was updated to version 3.10.6r10 and, for some unknown reason, all the packages that were installed are gone. Among them, Podfox. I managed to reinstall almost all of them, but Podfox gives the following error:
pip3 install podfox
Collecting podfox
Using cached podfox-0.1.2-py3-none-any.whl (5.8 kB)
Collecting colorama==0.3.7
Using cached colorama-0.3.7-py2.py3-none-any.whl (19 kB)
Collecting feedparser==5.2.1
Using cached feedparser-5.2.1.zip (1.2 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in feedparser setup command: use_2to3 is invalid.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
How can I resolve this issue and install Podfox again?
ps: If Podfox is installed, will it recognize the Podcasts already collected and configured in the previous installation?
After installing I received this error from line 93 in feedparser.py:
_base64decode = getattr(base64, 'decodebytes', base64.decodestring) AttributeError: module 'base64' has no attribute 'decodestring'
I can't seem to create a new pull request, or I would just push my changes... Very easy fix: just change the end of line 94 to read base64.decodebytes
and everything runs like a dream.
Thanks for writing this! It's very awesome. :)
I tried the http://feeds.feedburner.com/techsnapmp3 feed link using podfox,
$ podfox episodes ts
419: Nebulous Networking | Downloaded
395: The ACME Era | Downloaded
394: All About Azure | Downloaded
393: Back to our /roots | Downloaded
392: Keeping up with Kubernetes | Downloaded
Episode 391: Firecracker Fundamentals | Downloaded
Episode 390: What’s Up with WireGuard | Downloaded
Episode 389: The Future of HTTP | Downloaded
Episode 388: The One About eBPF | Downloaded
Episode 387: Private Cloud Building Bloc | Downloaded
Episode 386: What Makes Google Cloud Dif | Downloaded
Episode 385: 3 Things to Know About Kube | Downloaded
Episode 384: Interplanetary Peers | Not Downloaded
Episode 383: The Power of Shame | Not Downloaded
Episode 382: Domestic Disappointments | Not Downloaded
Episode 381: Here Comes Cloud DNS | Not Downloaded
Episode 380: Terminal Fault | Not Downloaded
Episode 379: SegmentSmack is Whack | Not Downloaded
Episode 378: Two-Factor Fraud | Not Downloaded
Episode 377: Linux Under Pressure | Not Downloaded
the link opened in browser contains a lot of episodes(hundreds), including 426 which is the latest one, and 418 which should be listed in the podfox episodes
.
On Arch Linux (https://aur.archlinux.org/packages/podfox-git/), podfox crashes:
$ podfox feeds
Traceback (most recent call last):
File "/usr/bin/podfox", line 11, in <module>
load_entry_point('podfox==0.1.1', 'console_scripts', 'podfox')() File "/usr/lib/python3.5/site-packages/podfox/__init__.py", line 304, in main pretty_print_feeds(available_feeds()) File "/usr/lib/python3.5/site-packages/podfox/__init__.py", line 221, in available_feeds base = CONFIGURATION['podcast-directory'] KeyError: 'podcast-directory'
A way to fix this is to declare CONFIGURATION global:
def main():
...
try:
global CONFIGURATION
CONFIGURATION = json.load(conf_file)
It is patched now for Arch Linux, however, other platforms or distros may also have this issue.
I've done:
podfox import
podfox update
podfox download
podfox episodes
The epidodes are marked "Downloaded" but are not found in the folder. I see audio.mp3 and feed.json there and nothing else. feed.json doesn't contain any hints about what the files might be called so that I can try find or locate.
Any ideas?
Thanks!
Edit -- I suspect that "audio.mp3" is a default filename used for all downloads in the podcast ("Freakonomics Radio")
Hi,
Nice your program.
A good balance between features and length.
I don't know a lot of Python although I intend to improve my skills.
So, when I enter the command "podfox episodes " the first column is very small to my needs.
I think this can be solved with just one or two modifications to the code, but I can't figure where.
I already made one or two tries, but with no results.
Can you tell me please what I should change in order to have a larger first column.
Thanks in advance.
Cheers,
Luis
Please add an option to rename episodes to real names (possibly shorten ones), then you could keep the filenames as links or symlinks.
I'm thinking of naming it as something like:
S01E03-real_name_of_the_episode.mp3
thanks
Hi
I have sometimes some downloads that does not finish. Podfox is waiting infinitely. I then have to break with crtl-C. Maybe special cases in function download_single
.
I notice today that in rare cases, files are not complete.
Any idea ?
Thanks anyway fot this tool !
As part of download
command or a separate prune
command, delete podcast episodes that have been published prior to the specified time.
thanks for your work, I've been using podget until now and i found you project much better.
I've added a few features that more suiting my use case and maybe other will benefit:
I'm not py dev and all changes are pretty dirty but works, you can find them all here: https://github.com/amirsher/podfox
Feature request: When downloading an episode, record the actual on-disk filename that gets saved, and then attach that to the episode entry in the json data file.
Reasoning/Background:
I use podfox on a particular subscription-only RSS feed. It's presumably doing some server-side CGI and redirection gymnastics to ensure that I'm me and to make it more difficult for people to guess filenames on a CDN. But the practical upshot is that my feed.json has entries like this (the X's represent the lengths of the hex guids/tokens, without revealing the actual tokens):
"url": "https://sphinx.acast.com/p/open/s/xxxxxxxxxxxxxxxxxxxxxxxx/e/xxxxxxxxxxxxxxxxxxxxxxxx/media.mp3?tk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&sig=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
And, once downloaded, filenames that look like this:
The guids in the file names don't seem to correlate with anything in the URL. Because this is a large feed that goes back quite a few years in history, I have 1,201 mp3 files and no way to tell which matches a given episode. Ideally, the feed json would have some way to match episode to filename.
It's been a while since I dug into this project (just haven't been following any podcasts these days), but with a recent update over mimetypes a thought popped in my mind.
I figured I'd add it here since I'm in no state to set up and test myself right now.
Perhaps use either a split("/") or str.startswith() to test the first half of the mimetype only.
As all mimetypes podfox works with are either audio or video types, this would save managing the subtypes in a list.
Possible code around line 195:
if hasattr(link, 'type') and (link.type.split("/")[0] in ("audio", "video")):
If nothing else, it's something I'm sure someone can bang their head against and come up with a solution to
Hi,
I just try to install podfox and I have this error, do you know how I can solve it?
Downloading/unpacking podfox
Downloading podfox-0.1.2.tar.gz
Running setup.py (path:/tmp/pip-build-JLFnjG/podfox/setup.py) egg_info for package podfox
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-JLFnjG/podfox/setup.py", line 3, in <module>
with open('requirements.txt') as f:
IOError: [Errno 2] No such file or directory: 'requirements.txt'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-JLFnjG/podfox/setup.py", line 3, in <module>
with open('requirements.txt') as f:
IOError: [Errno 2] No such file or directory: 'requirements.txt'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-JLFnjG/podfox
Storing debug log for failure in /home/podcastuser/.pip/pip.log```
Thanks in advance!
podfox should have an optional progress bar
for a feed like this:
https://media.acast.com/lukeandpete/episode61-theresatoadinmysuitcase-whatamigonnado-/media.mp3
it always names the file media, which overwrites my podcasts..
Is there a possibility you can change this somehow?
The installation works fine with python3!
I created the podfox configuration file but it doesn't work
podcastuser@xxx:~$ podfox import http://radiofrance-podcast.net/podcast09/rss_14522.xml nora_hamzawi
Traceback (most recent call last):
File "/usr/local/bin/podfox", line 9, in <module>
load_entry_point('podfox==0.1.1', 'console_scripts', 'podfox')()
File "/usr/local/lib/python3.4/dist-packages/podfox-0.1.1-py3.4.egg/podfox/__init__.py", line 300, in main
shortname=arguments['<shortname>'])
File "/usr/local/lib/python3.4/dist-packages/podfox-0.1.1-py3.4.egg/podfox/__init__.py", line 86, in import_feed
folder = get_folder(shortname)
File "/usr/local/lib/python3.4/dist-packages/podfox-0.1.1-py3.4.egg/podfox/__init__.py", line 60, in get_folder
base = CONFIGURATION['podcast-directory']
KeyError: 'podcast-directory'
podcastuser@xxx:~$ cat .podfox.json
{
"podcast-directory" : "/home/podcastuser/podcasts",
"maxnum" : 5
}
Thanks
@brtmr has podfox been abandoned?
Add a a feature to pick an episode from a list and download it.
After install, I tried:
podfox import http://feeds.feedburner.com/techsnapmp3
It gave me the following error:
Traceback (most recent call last):
File "/usr/local/bin/podfox", line 11, in <module>
load_entry_point('podfox==0.1.2', 'console_scripts', 'podfox')()
File "build/bdist.linux-i686/egg/pkg_resources/__init__.py", line 564, in load_entry_point
File "build/bdist.linux-i686/egg/pkg_resources/__init__.py", line 2608, in load_entry_point
File "build/bdist.linux-i686/egg/pkg_resources/__init__.py", line 2268, in load
File "build/bdist.linux-i686/egg/pkg_resources/__init__.py", line 2274, in resolve
File "/usr/local/lib/python2.7/dist-packages/podfox/__init__.py", line 52
Fore.RESET + Back.RESET + Style.RESET_ALL, file=sys.stderr)
All mp3s of my podcast are named media.mp3, so that each new download overwirtes the last one.
How do I reset podfox. I can't find out how to download the first episode that is now overwritten...
On a fresh install of podfox with the recommended config in my local .podfox.json I get the following error when I try to download an episode:
$ podfox download jupiter
Traceback (most recent call last):
File "/home/ben/PythonEnvs/podfox_env/bin/podfox", line 33, in <module>
sys.exit(load_entry_point('podfox==0.1.1', 'console_scripts', 'podfox')())
File "/home/ben/PythonEnvs/podfox_env/lib/python3.9/site-packages/podfox-0.1.1-py3.9.egg/podfox/__init__.py", line 401, in main
download_multiple(feed, maxnum)
File "/home/ben/PythonEnvs/podfox_env/lib/python3.9/site-packages/podfox-0.1.1-py3.9.egg/podfox/__init__.py", line 227, in download_multiple
if not episode['downloaded'] and not episode_too_old(episode, CONFIGURATION['maxage-days']):
KeyError: 'maxage-days'
It looks like maxage-days
is missing from the default config. If I add maxage-days
to my local config the download works fine. I've created a small change to fix this and I'll create a pull request for it shortly.
Please consider adding the Published date to the output of podfox episodes
feature. This is a very useful column to know if there are new podcasts to be listened to.
Hi,
This is an issue :)
If I already have downloaded all the episodes for a feed and if I enter the command "podfox download" it will download again the last five episodes (at this moment I only have one feed).
I think it would be nice and easy to say "No new episodes to download.".
When I improve my skills, maybe I can try to manage this :)
Anyway, I think it would be a nice improvement to the base version.
Cheers,
Luis
Any idea why the stackoverflow podcast episodes won't download? The feed.json does not get populated at all...
I used the url https://stackoverflow.blog/podcast/feed for import, as the RSS link advertised on the site (https://feeds.simplecast.com/XA_851k3) didn't work for me. Any help is appreciated, cheers
...and THANKS for this awesome tool!
To make it easier to add other features like downloading specific podcasts, it would be a good idea to add an ID attribute for podcast records. Using a straight numeric ID would not be ideal as there may be cases where the numbers to get out of sync.
To create a safe unique identifier, you can create a short hash of the podcast audio URL as follows:
import hashlib
feed_url="https://media.transistor.fm/9c4b292f/754f684f.mp3"
feed_id=hashlib.shake_256(feed_url.encode()).hexdigest(5)
This will create a short 10 character hash that would be unique for every feed regardless of the changes to the feeds. As long as the feed does not re-use podcast URLs, there should be no collisions.
This ID should be stored in the feed.json as id
and it can be used to download specific podcasts.
Hi,
I assume the that the field "published" of the "feed.json" file represents a time. Is it?
In that case, I would like to know:
1 - Which time is it?
2 - How can I convert it to a readable date and time?
Thanks in advance.
Cheers,
Luis
$ podfox import https://feeds.feedburner.com/BeersWithTalosPodcast.rss
imported Beers with Talos Podcast with shortname beers-with-talos-podcast
$ podfox update beers-with-talos-podcast
updating Beers with Talos Podcast
$ cat beers-with-talos-podcast/feed.json
{
"episodes": [],
"shortname": "beers-with-talos-podcast",
"title": "Beers with Talos Podcast",
"url": "https://feeds.feedburner.com/BeersWithTalosPodcast.rss"
}%
Empty list of episodes, the rss feed seems valid, is there a known issue with feedburner feeds?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.