| @@ -6,6 +6,8 @@ | ||
| 6 | 6 | ksimpson, oct 2004. needs Python 2.3. |
| 7 | 7 | """ |
| 8 | 8 | |
| 9 | __version__ = "1.0" | |
| 10 | ||
| 9 | 11 | import os |
| 10 | 12 | import shutil |
| 11 | 13 | import sys |
| @@ -15,7 +17,8 @@ | ||
| 15 | 17 | IPOD = "/Volumes/IPOD" |
| 16 | 18 | CACHE = os.path.expanduser("~/.podgrab") |
| 17 | 19 | SEEN = os.path.join(CACHE, "seen") |
| 18 | UA = "podgrab/0.2 (+http://ttul.org/)" | |
| 20 | UA = "podgrab/%s (+http://ttul.org/)" % __version__ | |
| 21 | MAX_PER_FEED = 3 | |
| 19 | 22 | |
| 20 | 23 | |
| 21 | 24 | def fetch(url): |
| @@ -57,7 +60,7 @@ | ||
| 57 | 60 | for title, url in read_opml(opml): |
| 58 | 61 | print "==>", title |
| 59 | 62 | try: |
| 60 | encs = list(enclosures(url)) | |
| 63 | encs = list(enclosures(url))[:MAX_PER_FEED] | |
| 61 | 64 | except Exception, e: |
| 62 | 65 | print " feed broken:", e |
| 63 | 66 | continue |