Git Product home page Git Product logo

upodder's Issues

When the url is not a feed

Hello,

somtimes a podcast disappears. But the url still works and upodder downloads it, tryies to parse it and fails:

Traceback (most recent call last): File "/home/user/.pyenv/versions/2.7.10/bin/upodder", line 11, in <module> sys.exit(main()) File "/home/user/.pyenv/versions/2.7.10/lib/python2.7/site-packages/upodder/upodder.py", line 193, in main process_feed(url) File "/home/user/.pyenv/versions/2.7.10/lib/python2.7/site-packages/upodder/upodder.py", line 168, in process_feed l.info("Checking feed: %s"%feed.feed.title) File "/home/user/.pyenv/versions/2.7.10/lib/python2.7/site-packages/feedparser.py", line 400, in __getattr__ raise AttributeError, "object has no attribute '%s'" % key AttributeError: object has no attribute 'title'
That is, it looks for some attribute and it does not exit.
As a suggestion, at least upodder should show which feed is parsing in order to make easier to delete it. Something like this:

if url and url[0] not in CONFIGCOMMENT: l.debug("Url: %s" % url) process_feed(url)
It would be nice to be able to capture the exception and to allow upodder to continue downloading podcasts...

Thank you and keep up the good work!

Create one subdirectory per feed

Could you add a command line argument (e.g. -s) to create one subdirectory per feed inside the -p path? That would be ideal for organization when downloading/archiving huge amounts of podcast. If that option already exists I could not find it in the documentation.

I continually get this error, which I just ignore

Too old for us: Celebrating (or not) the Centenary of the Russian Revolution [Audio]
Already seen: Celebrity [Audio]
Downloading The French Election and the Left [Audio] from http://media.rawvoice.com/lse_publiclecturesandevents/richmedia.lse.ac.uk/publiclecturesandevents/20170509_1830_theFrenchElectionAndTheLeft.mp3
100%|████████████████████████████████████████████████| 42.5M/42.5M [00:25<00:00, 1.66MB/s]
Moving {/tmp/upodder/cadce213ff5c92391888d1e784a4180c93cad59d} to {/home/Jadamso/Desktop/MiscPersonal/Audio/Podx/The_French_Election_and_the_Left_Audio_.mp3}
Traceback (most recent call last):
File "/usr/bin/upodder", line 9, in
load_entry_point('upodder==0.6.9', 'console_scripts', 'upodder')()
File "/usr/lib/python2.7/site-packages/upodder/upodder.py", line 212, in main
process_feed(url)
File "/usr/lib/python2.7/site-packages/upodder/upodder.py", line 192, in process_feed
EntryProcessor(entry, feed)
File "/usr/lib/python2.7/site-packages/upodder/upodder.py", line 98, in init
SeenEntry( pub_date=self.pub_date, hashed=self.hashed)
File "/usr/lib64/python2.7/site-packages/sqlobject/main.py", line 1301, in init
self._create(id, **kw)
File "/usr/lib64/python2.7/site-packages/sqlobject/main.py", line 1352, in _create
self._SO_finishCreate(id)
File "/usr/lib64/python2.7/site-packages/sqlobject/main.py", line 1381, in _SO_finishCreate
self._init(id)
File "/usr/lib64/python2.7/site-packages/sqlobject/main.py", line 986, in _init
self._SO_selectInit(selectResults)
File "/usr/lib64/python2.7/site-packages/sqlobject/main.py", line 1227, in _SO_selectInit
colValue = _col.to_python(colValue, self._SO_validatorState)
File "/usr/lib64/python2.7/site-packages/sqlobject/col.py", line 1251, in to_python
return datetime.timedelta(seconds=value.seconds)
AttributeError: 'str' object has no attribute 'seconds'

podx.txt

Better support for m4a files

Please consider adding support for 'audio/x-m4a' filetype in order to improve downloading of some m4a podcast files on feeds like these:

http://feeds.soundcloud.com/users/soundcloud:users:205124646/sounds.rss
http://allearsenglish.libsyn.com/rss

This is my current FILE_TYPES dictionary:

# Dict of possible file types
FILE_TYPES = {
    'audio/mpeg': 'mp3',
    'audio/x-m4a': 'm4a',
    'video/x-m4v': 'm4v',
    'audio/x-opus': 'opus',
    'audio/x-ogg': 'ogg',
    'audio/aac': 'aac',
    'audio/mp4': 'm4a',
    'audio/mp3': 'mp3'
    }

Feedparser is returning good date when HTTP encoding disagrees with the content encoding but upodder ignores it

What steps will reproduce the problem?
1. Using this rss feed: 
http://downloads.bbc.co.uk/podcasts/radio4/fricomedy/rss.xml
2. Run upodder

What is the expected output? What do you see instead?

Upodder reports a problem with the feed, but there is nothing wrong with the 
feed but feedparser reports that it has overridden the HTTP encoding.  
Feedparser sets bozo and sets bozo_exception to CharacterEncodingOverride in 
this case.  Below is a small patch to address this case.


What version of the product are you using? On what operating system?
r7 version.

Patch to address this issue.

Index: upodder.py
===================================================================
--- upodder.py  (revision 7)
+++ upodder.py  (working copy)
@@ -164,7 +164,7 @@
 def manageFeed(url):
        """Let's deal with this podcast feed"""
        feed = feedparser.parse(url)
-       if feed.bozo:
+       if feed.bozo and type(feed.bozo_exception) != 
type(feedparser.CharacterEncodingOverride())::
                l.error("Erroneous feed URL: %s (%s)"%(url,feed.bozo_exception))
                return
        l.info("Checking feed: {%s}"%feed.feed.title)



Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 24 Sep 2011 at 9:44

Allow to customize User-Agent

Some podcast hosting services (blubrry.com for example) do not allow default 
urllib user agent. It would be nice to allow some customization here.

Original issue reported on code.google.com by [email protected] on 2 Jun 2014 at 3:34

Cross-device link

Hey there! Thanks for picking up maintenance of upodder!

I ran into a problem when using upodder from PyPI. If your /tmp/ directory is on a different partition than your target directory (as is very common with *nix machines), you'll see an error like this:

(snip)
python2.7/site-packages/upodder/upodder.py", line 127, in _download_enclosure
    os.rename(downloadto, moveto)
OSError: [Errno 18] Cross-device link

Moves/renames can't be executed across partitions/devices like that. The usual response is to either:

  1. Copy the target to destination, then delete the original copy of the target.
  2. Use a location on the same partition as the temporary file.

The latter is preferable in most of my experience, so I created the AtomicSaver (docs, code). Give it a glance and let me know if you'd like any help fixing this issue.

ImportError: No module named '__version__'

$ pip install --user upodder
Collecting upodder
  Downloading upodder-0.6.tar.gz
Requirement already satisfied (use --upgrade to upgrade): clint in /home/chaz/.local/lib64/python3.4/site-packages (from upodder)
Requirement already satisfied (use --upgrade to upgrade): requests in /home/chaz/.local/lib64/python3.4/site-packages (from upodder)
Collecting feedparser (from upodder)
  Downloading feedparser-5.2.1.zip (1.2MB)
    100% |████████████████████████████████| 1.2MB 562kB/s
Collecting sqlobject (from upodder)
  Downloading SQLObject-2.1.2.tar.gz (888kB)
    100% |████████████████████████████████| 890kB 597kB/s
Requirement already satisfied (use --upgrade to upgrade): args in /home/chaz/.local/lib64/python3.4/site-packages (from clint->upodder)
Collecting FormEncode>=1.1.1 (from sqlobject->upodder)
  Downloading FormEncode-1.3.0.zip (347kB)
    100% |████████████████████████████████| 348kB 404kB/s
Building wheels for collected packages: upodder, feedparser, sqlobject, FormEncode
  Running setup.py bdist_wheel for upodder ... done
  Stored in directory: /home/chaz/.cache/pip/wheels/d2/c2/43/8445d32279fc05769c0aa02edfa327db5a54ccf9b906ed8cb2
  Running setup.py bdist_wheel for feedparser ... done
  Stored in directory: /home/chaz/.cache/pip/wheels/15/ce/10/b500f745822ea6db6ea8ed225c06b15c000d71016b89ef9037
  Running setup.py bdist_wheel for sqlobject ... done
  Stored in directory: /home/chaz/.cache/pip/wheels/ce/bb/3c/d85c24595ac5767bc000b054bd1e1e0fbeb430c6945953921c
  Running setup.py bdist_wheel for FormEncode ... done
  Stored in directory: /home/chaz/.cache/pip/wheels/89/df/07/2bb5e9f2c89f5dfa839a366f4148cfd1ee9bc9c661b7160cc6
Successfully built upodder feedparser sqlobject FormEncode
Installing collected packages: feedparser, FormEncode, sqlobject, upodder
Successfully installed FormEncode-1.3.0 feedparser-5.2.1 sqlobject-2.1.2 upodder-0.6
$ upodder
Traceback (most recent call last):
  File "/home/chaz/.local/bin/upodder", line 7, in <module>
    from upodder.upodder import main
  File "/home/chaz/.local/lib/python3.4/site-packages/upodder/upodder.py", line 15, in <module>
    from sqlobject import SQLObject, sqlite, DateTimeCol, UnicodeCol
  File "/home/chaz/.local/lib/python3.4/site-packages/sqlobject/__init__.py", line 2, in <module>
    from __version__ import version, version_info
ImportError: No module named '__version__'

Show feed name that is being processed

At the moment you start upodder, it stays silent for a bit (downloading the feed no doubt), then shows the urls "too old" and "already seen".

Would be nice if could show the name of the feed it is processing before it shows the urls...

Log level

I would like to not get debug logging but --log-level doesn't appear to do anything...

ignore feeds older than X number of days fails

the oldness argument is supposed to allow the script to ignore feed items older than X number of days (default=30). If I try to use this option, it always fails because the number I enter on the commandline is a string instead of an int.

The fix is easy: please add type=int to the add_argument() function

The default=30 always works, because 30 is an int. But commandline arguments are interpreted as strings by default.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.