diff options
Diffstat (limited to '')
-rw-r--r-- | app.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1,8 +1,19 @@ +import scrapy +from scrapy.crawler import CrawlerProcess +from scrapy.utils.project import get_project_settings + +from crawler.neodarznet.spiders.scrape import ScrapSpider + from database.models import Page, db import config +process = CrawlerProcess(get_project_settings()) + def main(): db.create_tables([Page]) + process.crawl(ScrapSpider) + process.start() + if __name__ == '__main__': main() |