Closed cocokakao closed 5 years ago
for example
-n '{date:%Y%m%d}_{name}'
will generate filename like "20151102_89f65052jw1exmr5v05s0j20k00k0q3m.jpg"
key wrapped with {}
is dynamic and will be replaced by actual value
the characters outside of {}
are fixed and appear in filename without any change
supported keys: url, index, type, mid, bid, date, text, name
{url}
resource url{index}
photo index, from 1 to 9 (up to 9 photos per weibo){type}
only two types: 'photo' or 'video'{mid}
weibo id{bid}
another format of weibo id{date}
weibo's post date (you can set time format after :
like the example, format code can be found in https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes){text}
text in weibo{name}
original filename (with extension name)Oh my god you are really kind, thank you vert much :)
not at all :)
Can you tell me in detail how to rename the file? I did not understand f-string. What should I enter after -n?