selenium app wip
This commit is contained in:
@@ -9,6 +9,7 @@ app = FastAPI()
|
|||||||
@app.get("/get_missing_kids/")
|
@app.get("/get_missing_kids/")
|
||||||
def get_missing_kids(pages: int = -1):
|
def get_missing_kids(pages: int = -1):
|
||||||
try:
|
try:
|
||||||
|
logger.info("Get missing kids, #pages={}".format(pages))
|
||||||
res = {"list_urls": MissingKidsFetcher().get_missing_kids_urls(first_n_pages=pages)}
|
res = {"list_urls": MissingKidsFetcher().get_missing_kids_urls(first_n_pages=pages)}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
res = {}
|
res = {}
|
||||||
@@ -20,6 +21,7 @@ class Body(BaseModel):
|
|||||||
@app.post("/verify_missing_kid/")
|
@app.post("/verify_missing_kid/")
|
||||||
def get_missing_kids(data: Body):
|
def get_missing_kids(data: Body):
|
||||||
try:
|
try:
|
||||||
|
logger.info("Verify missing kid, URL={}".format(data.url))
|
||||||
res = MissingKidsFetcher().verify_missing_kid_url(data.url)
|
res = MissingKidsFetcher().verify_missing_kid_url(data.url)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
res = {}
|
res = {}
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- fetcher_db
|
- fetcher_db
|
||||||
- fetcher_redis
|
- fetcher_redis
|
||||||
|
- fetcher_app_selenium
|
||||||
dns:
|
dns:
|
||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
- 1.0.0.1
|
- 1.0.0.1
|
||||||
|
|||||||
Reference in New Issue
Block a user