|
@@ -1,6 +1,10 @@
|
|
|
# -*- coding: utf-8 -*-
|
|
|
# @Author: wangkun
|
|
|
# @Time: 2022/9/1
|
|
|
+"""
|
|
|
+上传视频到阿里云 OSS
|
|
|
+上传视频到管理后台
|
|
|
+"""
|
|
|
import json
|
|
|
import os
|
|
|
import random
|
|
@@ -8,7 +12,6 @@ import time
|
|
|
import oss2
|
|
|
import requests
|
|
|
import urllib3
|
|
|
-# from crawler_shipinhao.main.common import Common
|
|
|
from main.common import Common
|
|
|
proxies = {"http": None, "https": None}
|
|
|
|
|
@@ -135,7 +138,7 @@ class Publish:
|
|
|
os.rmdir(local_file)
|
|
|
Common.logger(log_type).info("remove local file dir = {} success".format(local_file))
|
|
|
|
|
|
- local_file_path = './videos/'
|
|
|
+ local_file_path = './videos'
|
|
|
video_file = 'video'
|
|
|
image_file = 'image'
|
|
|
info_file = 'info'
|
|
@@ -245,6 +248,7 @@ class Publish:
|
|
|
else:
|
|
|
video_id = cls.publish_video_dev(log_type, data)
|
|
|
cls.remove_local_file_dir(log_type, fi_d)
|
|
|
+ Common.logger(log_type).info('video_id:{}', video_id)
|
|
|
return video_id
|
|
|
|
|
|
else:
|