diff --git a/Crawler/Crawler.iml b/Crawler/Crawler.iml index 8568e2d..db1dd1c 100644 --- a/Crawler/Crawler.iml +++ b/Crawler/Crawler.iml @@ -2,13 +2,13 @@ - + - + \ No newline at end of file diff --git a/Crawler/crawler.py b/Crawler/crawler.py index 99ff867..f3bea76 100644 --- a/Crawler/crawler.py +++ b/Crawler/crawler.py @@ -1,4 +1,5 @@ import sql +import amazonspider def crawl(product_ids: [int]) -> dict: @@ -50,13 +51,14 @@ def crawl(product_ids: [int]) -> dict: 'products_with_problems': products_with_problems } - def __crawl_amazon__(product_info: dict) -> tuple: """ Crawls the price for the given product from amazon :param product_info: A dict with product info containing product_id, vendor_id, url :return: A tuple with the crawled data, containing (product_id, vendor_id, price_in_cents) """ + + amazonspider.start_crawling() return (product_info['product_id'], product_info['vendor_id'], 123) diff --git a/Crawler/scrapy.cfg b/Crawler/scrapy.cfg index 83a4eef..9c0c1bc 100644 --- a/Crawler/scrapy.cfg +++ b/Crawler/scrapy.cfg @@ -8,4 +8,4 @@ default = crawler.settings [deploy] #url = http://localhost:6800/ -project = crawler +project = crawler \ No newline at end of file