Sitemap generator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
494 B

9 years ago
9 years ago
8 years ago
9 years ago
  1. import pysitemap
  2. """
  3. Example script
  4. Uses gevent to implement multiprocessing if Gevent installed
  5. To install gevent:
  6. $ pip install gevent
  7. """
  8. if __name__ == '__main__':
  9. url = 'http://www.example.com/' # url from to crawl
  10. logfile = 'errlog.log' # path to logfile
  11. oformat = 'xml' # output format
  12. outputfile = 'sitemap.xml' # path to output file
  13. crawl = pysitemap.Crawler(url=url, logfile=logfile, oformat=oformat, outputfile=outputfile)
  14. crawl.crawl(pool_size=20)