Kamo Petrosyan cbd135223d | 4 years ago | |
---|---|---|
pysitemap | 4 years ago | |
tests | 6 years ago | |
.gitignore | 6 years ago | |
CANGELOG | 6 years ago | |
LICENSE | 6 years ago | |
NOTICE | 6 years ago | |
README.md | 4 years ago | |
composer.json | 6 years ago | |
requirements.txt | 4 years ago | |
run.py | 4 years ago | |
setup.py | 4 years ago | |
sitemap.xml | 4 years ago |
Sitemap generator
pip install sitemap-generator
import sys
import logging
from pysitemap import crawler
if __name__ == '__main__':
if '--iocp' in sys.argv:
from asyncio import events, windows_events
sys.argv.remove('--iocp')
logging.info('using iocp')
el = windows_events.ProactorEventLoop()
events.set_event_loop(el)
# root_url = sys.argv[1]
root_url = 'https://www.haikson.com'
crawler(root_url, out_file='sitemap.xml')