[ale] Bash/Python Question

Jim Popovitch jimpop at gmail.com
Tue Mar 16 21:13:01 EDT 2010


On Tue, Mar 16, 2010 at 02:47, Omar Chanouha <ofosho at gatech.edu> wrote:
> Hey all,
>
>   I am creating an information gatherer for a school project.

There are 2 ways to do this.   Figure it out by yourself, or figure it
out with assistance from others.  Those that learn how to ask for
assistance and help, will go further in life than those that beat
their heads against the wall all day.   Since you asked for help....
Have a look at the attached, I wrote it last year'ish.  It fetches rss
feed(s) and downloads items that contain videos.  The one feed
currently in it is a public shared google reader feed that contains
various online videos.  I use this script to periodically download the
videos, queue them, and re-encode them to work on my blackberry.   The
code should be sort of self-explanatory, essentially there are 2
queues (DownloadQueue and EncodeQueue) that are subclasess of
WorkQueue.  Each item added to a Queue is assigned a TaskRunner
(DownloadTask and EncodeTask).   The main loop just looks for finished
tasks, pops them, and moves something from the Queue queued queue into
the Queue active queue.

It's not perfect, it still needs some tweaks.. but it works for what i
need it to do.

You will need Python's feedparser lib.   Enjoy

-Jim P.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rssfetch
Type: application/octet-stream
Size: 17058 bytes
Desc: not available
Url : http://mail.ale.org/pipermail/ale/attachments/20100316/7623319f/attachment-0001.obj 


More information about the Ale mailing list