|
@@ -24,10 +24,10 @@ from lxml import etree
|
|
sys.path.append(os.getcwd())
|
|
sys.path.append(os.getcwd())
|
|
from common.db import MysqlHelper
|
|
from common.db import MysqlHelper
|
|
from common.getuser import getUser
|
|
from common.getuser import getUser
|
|
-
|
|
|
|
from common.common import Common
|
|
from common.common import Common
|
|
from common.feishu import Feishu
|
|
from common.feishu import Feishu
|
|
from common.publish import Publish
|
|
from common.publish import Publish
|
|
|
|
+from common.public import get_user_from_mysql
|
|
|
|
|
|
|
|
|
|
class Follow:
|
|
class Follow:
|
|
@@ -997,11 +997,15 @@ class Follow:
|
|
@classmethod
|
|
@classmethod
|
|
def get_follow_videos(cls, log_type, crawler, strategy, oss_endpoint, env, machine):
|
|
def get_follow_videos(cls, log_type, crawler, strategy, oss_endpoint, env, machine):
|
|
try:
|
|
try:
|
|
- user_list = cls.get_user_list(log_type=log_type, crawler=crawler, sheetid="5tlTYB", env=env, machine=machine)
|
|
|
|
|
|
+ # user_list = cls.get_user_list(log_type=log_type, crawler=crawler, sheetid="5tlTYB", env=env, machine=machine)
|
|
|
|
+ user_list = get_user_from_mysql(log_type, crawler, crawler, env, machine)
|
|
|
|
+
|
|
for user in user_list:
|
|
for user in user_list:
|
|
- out_uid = user["out_uid"]
|
|
|
|
- user_name = user["user_name"]
|
|
|
|
- our_uid = user["our_uid"]
|
|
|
|
|
|
+ spider_link = user["spider_link"]
|
|
|
|
+ out_uid = spider_link.split('/')[-1]
|
|
|
|
+ user_name = user["nick_name"]
|
|
|
|
+ our_uid = user["media_id"]
|
|
|
|
+
|
|
Common.logger(log_type, crawler).info(f"开始抓取 {user_name} 用户主页视频\n")
|
|
Common.logger(log_type, crawler).info(f"开始抓取 {user_name} 用户主页视频\n")
|
|
cls.get_videolist(log_type=log_type,
|
|
cls.get_videolist(log_type=log_type,
|
|
crawler=crawler,
|
|
crawler=crawler,
|