Code Monkey home page Code Monkey logo

Comments (4)

JoeanAmier avatar JoeanAmier commented on May 22, 2024
  1. 删掉的作品不想重复下载其实可以使用发布时间限制实现,当你批量下载了某个账号的全部作品后,将当前日期作为最早发布日期限制,再次批量下载账号作品就不会处理早于该日期的作品,作品数量较多的情况下,使用发布时间限制不需要获取账号的全部作品数据,采集效率会更高。
  2. 文件保存名称的格式是可以自定义的,可以查看 README.mdname 参数,可以设置为作品ID,以后会优化账号昵称修改以后无法识别已下载作品的问题。
  3. 预防断电的建议不错,未来会进行优化。

from tiktokdownloader.

LetMeCarryU avatar LetMeCarryU commented on May 22, 2024

感谢回复。

1、好的。
2、我的锅,刚刚发现你的项目太开心了,着急分享心情没看仔细,现在已经弄好了。
3、谢谢。

再加一个:能不能把视频日期改成发布日期而不是我下载的日期。

image

有些文件工具会用到这个时间
image

from tiktokdownloader.

JoeanAmier avatar JoeanAmier commented on May 22, 2024

Python 内置模块不支持修改文件的创建时间,使用第三方模块 pywin32 可以实现,但是只对 Windows 系统适用,跨系统有局限性,暂时不考虑加入这个功能,如果有这个需求的人数较多,我会考虑新增功能,目前作品可以在文件名使用发布时间,不知道能不能解决你的问题。

或者你可以尝试自己修改代码实现:

import win32file
import pywintypes

# 文件路径
file_path = "path/to/your/file.txt"

# 获取当前时间作为新的创建时间
current_time = pywintypes.Time()

# 修改文件的创建时间
win32file.SetFileTime(file_path, creation_time=current_time)

from tiktokdownloader.

LetMeCarryU avatar LetMeCarryU commented on May 22, 2024

Python 内置模块不支持修改文件的创建时间,使用第三方模块 pywin32 可以实现,但是只对 Windows 系统适用,跨系统有局限性,暂时不考虑加入这个功能,如果有这个需求的人数较多,我会考虑新增功能,目前作品可以在文件名使用发布时间,不知道能不能解决你的问题。

或者你可以尝试自己修改代码实现:

import win32file
import pywintypes

# 文件路径
file_path = "path/to/your/file.txt"

# 获取当前时间作为新的创建时间
current_time = pywintypes.Time()

# 修改文件的创建时间
win32file.SetFileTime(file_path, creation_time=current_time)

好的,感谢,我不懂py代码,试一试。

from tiktokdownloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.