Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 23 lines (18 sloc) 0.505 kb
9fa9fb6 Change planet:subscription to planet:source, and expand the information
Sam Ruby authored
1 #!/usr/bin/env python
b31973d Initial load
Sam Ruby authored
2 """
3 Main program to run just the spider portion of planet
4 """
5
6 import sys
7 from planet import spider, config
8
9 if __name__ == '__main__':
10
c610c93 Load configuration only once
Sam Ruby authored
11 config.load(sys.argv[1])
12
b31973d Initial load
Sam Ruby authored
13 if len(sys.argv) == 2:
14 # spider all feeds
c610c93 Load configuration only once
Sam Ruby authored
15 spider.spiderPlanet()
cf8144b Handle FeedParser's peculiar handing of RSS 1.0 feeds
Sam Ruby authored
16 elif len(sys.argv) > 2:
b31973d Initial load
Sam Ruby authored
17 # spider selected feeds
18 for feed in sys.argv[2:]:
19 spider.spiderFeed(feed)
20 else:
21 print "Usage:"
22 print " python %s config.ini [URI URI ...]" % sys.argv[0]
Something went wrong with that request. Please try again.