mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2024-12-22 19:55:12 +00:00
Connected Api to Crawler
This commit is contained in:
parent
2067a47fb2
commit
776b9a00f2
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -4,3 +4,4 @@ flask-sqlalchemy
|
|||
flask_restful
|
||||
beautifulsoup4
|
||||
requests
|
||||
lxml
|
Loading…
Reference in New Issue
Block a user