|
@@ -7,12 +7,15 @@ import oss2
|
|
|
import aiohttp
|
|
|
import aiofiles
|
|
|
import asyncio
|
|
|
+import requests
|
|
|
+
|
|
|
+from datetime import datetime
|
|
|
from hashlib import md5
|
|
|
from uuid import uuid4
|
|
|
|
|
|
-import requests
|
|
|
from fake_useragent import FakeUserAgent
|
|
|
from applications.config import Config
|
|
|
+from applications.log import logging
|
|
|
|
|
|
|
|
|
async def downloadCover(file_path, platform, cover_url):
|
|
@@ -293,8 +296,11 @@ class AsyncETL(object):
|
|
|
:return:
|
|
|
"""
|
|
|
task_list = await self.getTasks()
|
|
|
+ logging(
|
|
|
+ code="5001",
|
|
|
+ info="ETL Task Got {} this time".format(len(task_list)),
|
|
|
+ function="ETL"
|
|
|
+ )
|
|
|
if task_list:
|
|
|
tasks = [self.processTask(params) for params in task_list]
|
|
|
await asyncio.gather(*tasks)
|
|
|
- else:
|
|
|
- print("No spider tasks")
|