FilesSubmittedBranchesLabelsClientsUsersJobsHelp
Tree viewShow file textShow revision historyShow/hide recent activityInformation
//depot/projects/podgrab/podgrab.py

Diffs between #1 and #2

@@ -7,6 +7,7 @@
77"""
88
99import os
10import shutil
1011import sys
1112import urllib
1213from xml.dom import minidom
@@ -50,13 +51,22 @@
5051 out = open(SEEN, "a")
5152 for title, url in read_opml(opml):
5253 print "==>", title
53 for enc in enclosures(url):
54 try:
55 encs = list(enclosures(url))
56 except Exception, e:
57 print " feed broken:", e
58 continue
59 for enc in encs:
5460 if enc in seen:
5561 continue
5662 fname = os.path.join(CACHE, os.path.basename(enc))
5763 print " ", enc
5864 urllib.urlretrieve(enc, fname)
5965 out.write(enc + "\n")
66 if os.path.isdir(IPOD):
67 # NB: this does not update the iTunesDB. use gtkpod, or
68 # just play it from the notes folder like a caveman.
69 shutil.copy(fname, os.path.join(IPOD, "Podcasts"))
6070 out.close()
6171
6272

P4Web/LINUX26X86/2005.1/82295 · Copyright © 1995-2005 Perforce Software · ttul.org