aboutsummaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/app.py b/app.py
index 2a80507..281f932 100644
--- a/app.py
+++ b/app.py
@@ -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()