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.

14 lines
431 B

9 years ago
8 years ago
4 years ago
  1. import sys
  2. import logging
  3. from pysitemap import crawler
  4. if __name__ == '__main__':
  5. if '--iocp' in sys.argv:
  6. from asyncio import events, windows_events
  7. sys.argv.remove('--iocp')
  8. logging.info('using iocp')
  9. el = windows_events.ProactorEventLoop()
  10. events.set_event_loop(el)
  11. # root_url = sys.argv[1]
  12. root_url = 'https://www.haikson.com'
  13. crawler(root_url, out_file='sitemap.xml')