qgyd2021 commited on
Commit
027903a
·
1 Parent(s): 5808ae0
main.py CHANGED
@@ -21,7 +21,8 @@ docker run -itd \
21
  --restart=always \
22
  --network host \
23
  -e server_port=7871 \
24
- -v /data/tianxing/PycharmProjects/video_platform:/data/tianxing/PycharmProjects/video_platform \
 
25
  python:3.12 /bin/bash
26
 
27
  nohup python3 main.py --server_port 7871 &
 
21
  --restart=always \
22
  --network host \
23
  -e server_port=7871 \
24
+ -v /Users/honey/PycharmProjects/video_platform:/data/tianxing/PycharmProjects/video_platform \
25
+ -v /Users/honey/Downloads/xianyu/customers:/data/tianxing/PycharmProjects/video_platform/temp/xianyu/customers \
26
  python:3.12 /bin/bash
27
 
28
  nohup python3 main.py --server_port 7871 &
requirements.txt CHANGED
@@ -22,3 +22,5 @@ selenium
22
  webdriver-manager
23
  chinesecalendar
24
  bypy
 
 
 
22
  webdriver-manager
23
  chinesecalendar
24
  bypy
25
+ pytubefix
26
+ yt-dlp
toolbox/porter/tasks/douyin_live_record_task.py CHANGED
@@ -242,6 +242,7 @@ class DouyinLiveRecordTask(BaseTask):
242
  room_url = f"https://live.douyin.com/{self.room_id}"
243
 
244
  live_check_method = "by_web_enter"
 
245
  js = await self.get_live_info_by_web_enter()
246
  if js is None:
247
  live_check_method = "by_room_url"
@@ -262,6 +263,7 @@ class DouyinLiveRecordTask(BaseTask):
262
  stream_data: dict = js["stream_data"]
263
  metadata = copy.deepcopy(js)
264
  metadata.pop("stream_data")
 
265
 
266
  if status != 2:
267
  logger.info(f"{self.flag} {live_check_method},未开播;")
 
242
  room_url = f"https://live.douyin.com/{self.room_id}"
243
 
244
  live_check_method = "by_web_enter"
245
+ js = None
246
  js = await self.get_live_info_by_web_enter()
247
  if js is None:
248
  live_check_method = "by_room_url"
 
263
  stream_data: dict = js["stream_data"]
264
  metadata = copy.deepcopy(js)
265
  metadata.pop("stream_data")
266
+ metadata["live_check_method"] = live_check_method
267
 
268
  if status != 2:
269
  logger.info(f"{self.flag} {live_check_method},未开播;")
toolbox/porter/tasks/video_to_youtube_task.py CHANGED
@@ -120,8 +120,8 @@ class VideoToYoutubeTask(BaseTask):
120
 
121
  title_and_tags = title
122
  for tag in tags:
123
- if len(title_and_tags) > 30:
124
- title_and_tags = title_and_tags[:30]
125
  break
126
  title_and_tags += f" #{tag}"
127
 
 
120
 
121
  title_and_tags = title
122
  for tag in tags:
123
+ if len(title_and_tags) > 80:
124
+ title_and_tags = title_and_tags[:80]
125
  break
126
  title_and_tags += f" #{tag}"
127
 
toolbox/youtube_spider/video/video_download.py CHANGED
@@ -118,7 +118,7 @@ def main2():
118
  target_file=(target_dir / f"{title}.mp4").as_posix()
119
  )
120
  print(f"sleeping ...")
121
- time.sleep(1800)
122
 
123
  return
124
 
 
118
  target_file=(target_dir / f"{title}.mp4").as_posix()
119
  )
120
  print(f"sleeping ...")
121
+ time.sleep(1800*4)
122
 
123
  return
124