完成api最后调试
This commit is contained in:
@@ -64,14 +64,7 @@ class CrawlerService:
|
||||
).values(status='processing')
|
||||
conn.execute(upd)
|
||||
return {"urls": urls}
|
||||
from sqlalchemy import select, insert, update, and_
|
||||
from .database import db_instance
|
||||
from .utils import normalize_url
|
||||
|
||||
class CrawlerService:
|
||||
def __init__(self):
|
||||
self.db = db_instance
|
||||
|
||||
|
||||
def save_results(self, task_id: int, results: list):
|
||||
"""
|
||||
保存同一 URL 的多个切片。
|
||||
@@ -164,4 +157,5 @@ class CrawlerService:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
crawler_service = CrawlerService()
|
||||
Reference in New Issue
Block a user