diff --git a/Crawler/api.py b/Crawler/api.py index 92617c4..0779b45 100644 --- a/Crawler/api.py +++ b/Crawler/api.py @@ -1,6 +1,9 @@ from flask import Flask from flask_restful import Resource, Api, reqparse +import crawler +import sql + app = Flask(__name__) api = Api(app) @@ -17,6 +20,7 @@ class CrawlerApi(Resource): def post(self): # Accept crawler request here args = parser.parse_args() + crawler.crawl(args['products']) return args diff --git a/Crawler/requirements.txt b/Crawler/requirements.txt index f7b6180..a704f27 100644 --- a/Crawler/requirements.txt +++ b/Crawler/requirements.txt @@ -3,4 +3,5 @@ flask==1.1.2 flask-sqlalchemy flask_restful beautifulsoup4 -requests \ No newline at end of file +requests +lxml \ No newline at end of file