qgyd2021 commited on
Commit
9f9caad
·
1 Parent(s): b8efe39
toolbox/douyin/homepage/follow.py CHANGED
@@ -59,7 +59,11 @@ class FollowManager(DouyinClient):
59
  nickname = owner["nickname"]
60
  room_id = row["web_rid"]
61
 
62
- live_core_sdk_data = stream_url["live_core_sdk_data"]
 
 
 
 
63
  pull_data = live_core_sdk_data["pull_data"]
64
  stream_data = pull_data["stream_data"]
65
 
 
59
  nickname = owner["nickname"]
60
  room_id = row["web_rid"]
61
 
62
+ try:
63
+ live_core_sdk_data = stream_url["live_core_sdk_data"]
64
+ except KeyError as error:
65
+ print(stream_url)
66
+ raise error
67
  pull_data = live_core_sdk_data["pull_data"]
68
  stream_data = pull_data["stream_data"]
69
 
toolbox/porter/tasks/douyin_live_record_task.py CHANGED
@@ -179,7 +179,7 @@ class DouyinLiveRecordTask(BaseTask):
179
  logger.debug(f"{self.flag} get_live_info_by_follow success_rate: {success_rate}")
180
  # if random.random() > max(float(success_rate) / 20, 0.01):
181
  # return None
182
- if random.random() > max(float(success_rate), 0.01):
183
  return None
184
 
185
  try:
 
179
  logger.debug(f"{self.flag} get_live_info_by_follow success_rate: {success_rate}")
180
  # if random.random() > max(float(success_rate) / 20, 0.01):
181
  # return None
182
+ if random.random() > max(float(success_rate), 0.03):
183
  return None
184
 
185
  try: