修复:下播后无法投稿的问题
This commit is contained in:
parent
7bc0b85ae5
commit
4c9d04f175
@ -309,6 +309,8 @@ class Bilibili:
|
|||||||
:param no_reprint: (optional) 0=可以转载, 1=禁止转载(default)
|
:param no_reprint: (optional) 0=可以转载, 1=禁止转载(default)
|
||||||
:type no_reprint: int
|
:type no_reprint: int
|
||||||
"""
|
"""
|
||||||
|
if len(self.videos) == 0:
|
||||||
|
return
|
||||||
self.session.headers['Content-Type'] = 'application/json; charset=utf-8'
|
self.session.headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||||
copyright = 2 if source else 1
|
copyright = 2 if source else 1
|
||||||
r = self.session.post('https://member.bilibili.com/x/vu/web/add?csrf=' + self.csrf,
|
r = self.session.post('https://member.bilibili.com/x/vu/web/add?csrf=' + self.csrf,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import m3u8
|
|
||||||
import queue
|
import queue
|
||||||
import threading
|
import threading
|
||||||
from config import config
|
from config import config
|
||||||
@ -74,6 +73,7 @@ def download(url):
|
|||||||
path = datetime.strftime(datetime.now(), "%Y%m%d_%H%M.flv")
|
path = datetime.strftime(datetime.now(), "%Y%m%d_%H%M.flv")
|
||||||
p = requests.get(url, stream=True)
|
p = requests.get(url, stream=True)
|
||||||
if p.status_code != 200:
|
if p.status_code != 200:
|
||||||
|
isUpload = True
|
||||||
return True
|
return True
|
||||||
f = open(path, "ab")
|
f = open(path, "ab")
|
||||||
try:
|
try:
|
||||||
@ -91,6 +91,7 @@ def download(url):
|
|||||||
print("{} : Download Daemon Quiting".format(datetime.strftime(datetime.now(), "%y%m%d %H%M")))
|
print("{} : Download Daemon Quiting".format(datetime.strftime(datetime.now(), "%y%m%d %H%M")))
|
||||||
download(url)
|
download(url)
|
||||||
|
|
||||||
|
|
||||||
def upload(date=datetime.strftime(datetime.now(), "%Y_%m_%d")):
|
def upload(date=datetime.strftime(datetime.now(), "%Y_%m_%d")):
|
||||||
print("{} : Upload Daemon Starting".format(datetime.strftime(datetime.now(), "%y%m%d %H%M")))
|
print("{} : Upload Daemon Starting".format(datetime.strftime(datetime.now(), "%y%m%d %H%M")))
|
||||||
i = uq.get()
|
i = uq.get()
|
||||||
|
Reference in New Issue
Block a user