feat: scraper usage example, fixed session handling
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from argparse import ArgumentParser
|
||||
from flask import Flask, Response, render_template
|
||||
from flask_apscheduler import APScheduler
|
||||
from fs_scraper import scraper
|
||||
from fs_scraper import scraper as scr
|
||||
from lewy_globals import colors as c
|
||||
import lewy_api
|
||||
import lewy_db
|
||||
@@ -73,7 +73,7 @@ def setup():
|
||||
app.add_url_rule('/api/<path:received_request>', view_func=lewy_api.api_global_catchall)
|
||||
|
||||
db = lewy_globals.setupDb(app, config)
|
||||
scrape = scraper()
|
||||
scraper = scr()
|
||||
|
||||
with app.app_context():
|
||||
db.create_all()
|
||||
@@ -92,7 +92,7 @@ def every5seconds():
|
||||
def every2hours():
|
||||
# zaktualizuj bazę danych scrapując FS
|
||||
# ...
|
||||
# print(scrape.pobierz_pojedyncza_strone())
|
||||
# scraper.aktualizuj_dane()
|
||||
return
|
||||
|
||||
@app.route('/<string:val>', methods=['GET'])
|
||||
|
||||
Reference in New Issue
Block a user