Connected Api to Crawler

This commit is contained in:
henningxtro 2021-05-16 23:16:57 +02:00
parent 2067a47fb2
commit 776b9a00f2
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -4,3 +4,4 @@ flask-sqlalchemy
flask_restful
beautifulsoup4
requests
lxml