AlphaSlayer1964 / kemono-dl

A simple kemono.party downloader using python.
509 stars 83 forks source link

[Requests] Create Downlaod History log file to quick download delta update posts #121

Open 0o0miku0o0 opened 2 years ago

0o0miku0o0 commented 2 years ago

Dear Developer,

Is it possibe to generate Downlaod History log file to record the download parameters and the last-update timestamp for each Service-UserID pair. Then when new posts are updated on Kemono, we can easily download only the delta new posts with the same download parameters as the previous download.

Description

For example: After below command is excuted completely.

python kemono-dl.py --cookies "cookie.txt" --links https://kemono.party/fanbox/user/123456 --inline --only-filetypes jpg,png --filename-pattern "{id}-{index}.{ext}"

A log file will be generated to record download parameters --inline --only-filetypes jpg,png --filename-pattern "{id}-{index}.{ext}" and also the last-update timestamp YYYY-MM-DD HH:MM:SS.MS for Service Fanbox and UserID 123456.

After a few months, new posts are updated on Kemono, we can just execute a shortened command to continue the download, the Script will first search in the log file to find previous download settings. Even though the previous downloaded files may be archived to other places/hard disks, this new command will still only download the delta updated posts between previous download and current date using the same download parameters.

python kemono-dl.py --cookies "cookie.txt" --links https://kemono.party/fanbox/user/123456 --delta-update

This command will take same effect as below.

python kemono-dl.py --cookies "cookie.txt" --links https://kemono.party/fanbox/user/123456 --inline --only-filetypes jpg,png --filename-pattern "{id}-{index}.{ext}" --dateafter YYYYMMDD

Additional comments

This feature will be extremely helpful when we are downloading a lot of Service/UserID pairs and each of them have different download parameters, and also helpful when previous download parameters and files are inconvenient to find, for example, previous download is moved/archived to other disks.