Add support for puppeteer to facilitate crawling with information on anti-crawl pages; introduce cache module to avoid frequent crawling of pages

This commit is contained in:
airchaoz
2023-04-01 15:47:35 +08:00
committed by 王志强
parent 64096acd2e
commit af216b7f7e
7 changed files with 593 additions and 327 deletions

View File

@@ -1,8 +1,15 @@
from flask_bootstrap import Bootstrap
from flask_debugtoolbar import DebugToolbarExtension
from flask_moment import Moment
from flask_caching import Cache
bootstrap = Bootstrap()
debugtoolbar = DebugToolbarExtension()
moment = Moment()
cache = Cache(config={
"DEBUG": True, # some Flask specific configs
"CACHE_TYPE": "simple", # Flask-Caching related configs
"CACHE_DEFAULT_TIMEOUT": 3600 # cache half hour
})