JoeanAmier / KS-Downloader

快手无水印视频/图片下载工具
GNU General Public License v3.0
188 stars 46 forks source link

【add】 增加输入用户id批量下载功能,加入cookie,数据库增加id对应中文名title #8

Closed dupeilin closed 2 months ago

dupeilin commented 2 months ago

【add】 增加输入用户id批量下载功能,加入cookie,数据库增加id对应中文名title

JoeanAmier commented 2 months ago

from source.downloader.kuaishou import Kuaishou 未解析的引用 'Kuaishou'

def truncation(string: str, length=256) -> str:
    result = ""
    for s in string:
        result += s
        if is_chinese_char(s):
            length -= 2
        else:
            length -= 1
        if length < 1:
            break
    return result

length 为什么想要改成 256 呢?

dupeilin commented 2 months ago

length 为什么想要改成256呢? 是因为控制台输出的标题总是不完整,改了发现不起作用,刚学的python找不到输出位置 from source.downloader.kuaishou import Kuaishou 未解析的引用'Kuaishou' 我看了,忘记add了,稍等重新上传下