Skip to content

Commit

Permalink
fix: save every version of every file
Browse files Browse the repository at this point in the history
  • Loading branch information
yzqzss committed Mar 27, 2024
1 parent 6c1754f commit ae9f58f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pukiWikiDumper/dump/media/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def try_download(*args, **kwargs):
print('Media: (%d/%d): [[%s]] ...' % (index_of_title+1, len(attaches), attach))

def download(attach: Dict[str, str], session: requests.Session):
filename = attach['refer'].encode('utf-8').hex() + '_' + attach['file'].encode('utf-8').hex()
filename = attach['refer'].encode('utf-8').hex() + '_' + attach['file'].encode('utf-8').hex() + (f".{attach['age']}" if attach['age'] else "")
filename = filename.upper()
if len(filename) > 255: # filename too long
subdir_A = filename[:255]
Expand Down

0 comments on commit ae9f58f

Please sign in to comment.