|
@@ -83,17 +83,17 @@ class SPH:
|
|
objectId = obj['id']
|
|
objectId = obj['id']
|
|
status = sqlCollect.is_used(task_mark, objectId, mark, "视频号")
|
|
status = sqlCollect.is_used(task_mark, objectId, mark, "视频号")
|
|
|
|
|
|
- old_title = obj['object_desc']['description']
|
|
|
|
- url_p = obj['object_desc']['media'][0]['url']
|
|
|
|
- url_token = obj['object_desc']['media'][0]['url_token']
|
|
|
|
|
|
+ old_title = obj['objectDesc']['description']
|
|
|
|
+ url_p = obj['objectDesc']['media'][0]['Url']
|
|
|
|
+ url_token = obj['objectDesc']['media'][0]['urlToken']
|
|
video_url = f"{url_p}{url_token}"
|
|
video_url = f"{url_p}{url_token}"
|
|
- decode_key = obj['object_desc']['media'][0]['file_size']
|
|
|
|
- cover = obj['object_desc']['media'][0]['cover_url']
|
|
|
|
|
|
+ decode_key = obj['objectDesc']['media'][0]['FileSize']
|
|
|
|
+ cover = obj['objectDesc']['media'][0]['coverUrl']
|
|
|
|
|
|
- share_cnt = int(obj['forward_count']) # 分享
|
|
|
|
- like_cnt = int(obj['like_count']) # 点赞
|
|
|
|
- duration_ms = obj['object_desc']['media'][0]['spec'][0]["duration_ms"]
|
|
|
|
- duration = int(duration_ms) / 1000
|
|
|
|
|
|
+ share_cnt = int(obj['forwardCount']) # 分享
|
|
|
|
+ like_cnt = int(obj['likeCount']) # 点赞
|
|
|
|
+ duration = int(obj['objectDesc']['media'][0]['VideoPlayLen'])
|
|
|
|
+ # duration = int(duration_ms) / 1000
|
|
|
|
|
|
log_data = f"user:{url_id},,video_id:{objectId},,video_url:{video_url},,original_title:{old_title},,share_count:{share_cnt},,like_count:{like_cnt},,duration:{duration}"
|
|
log_data = f"user:{url_id},,video_id:{objectId},,video_url:{video_url},,original_title:{old_title},,share_count:{share_cnt},,like_count:{like_cnt},,duration:{duration}"
|
|
AliyunLogger.logging(channel_id, name, url_id, objectId, "扫描到一条视频", "2001", log_data)
|
|
AliyunLogger.logging(channel_id, name, url_id, objectId, "扫描到一条视频", "2001", log_data)
|