download subtitles from rss

November 18, 2009 at 10:12:59
Specs: Windows xp, 2048

i need a script that can read a rss feed and download some of the srt(subtitle) files from a link in the feed.

The script must be able to scan a directory with mkv files (in subdirectories) and compare the mkv filenames to the srt filename (in the rss feed so that when it finds a subtitle belonging to a movie or tvshow (for example "Supernatural.S05E09.HDTV.XviD-FQM" ) it will be downloaded to the concerning video directory.

Can this be done in python?

Can someone please help me?

See More: download subtitles from rss

Report •

November 18, 2009 at 13:39:03
i would start with using WGET to obtain the feed:
wget -O rssfeed
(unless the site name changes all the time)
find /i " <link" < rssfeed > links

at that point it should be fairly straightforward batch to process the links file.

wget can be found at

Report •

November 18, 2009 at 16:31:00
>> Can this be done in python?

of course. But first, you must go the here to learn how.

some hints after that
1) use os.walk() to recurse a directory
2) to get mkv files, you can use files.endswith("mkv")
3) store the files you found in a list
4) use urllib2 to get RSS web page
5) parse the links of srt
6) for each link parsed, check with the list you stored
7) if found, do your stuff

GNU win32 packages | Gawk

Report •

November 18, 2009 at 17:18:30
With python, be wary that most of the examples on the net are for 2.x versions(of course the official docs linked above will be fine) if you plan to use 3.x. There are quite a few changes in 3.x, I believe urllib2 was split into 2 parts and one of the html parsers was changed and moved into another library(from memory), just to name a few that are relevant.

Batch Variable how to

Report •

Related Solutions

Ask Question