Closed LorenzoAlemanHub closed 2 years ago
Are you in Windows and using cmd/powershell?
It's possible that your shell is replacing %date%
by the environment variable DATE, which contains the current date in your locale's format.
Make sure the % is escaped properly in that case. It might be hard in CMD, but you can do something like:
python twitter_media_downloader.py -o out -f "test %date% %filename%.%ext%" -u Twitter
Becomes (note the quotes around the percent):
python twitter_media_downloader.py -o out -f "test "%"date"%" %filename%.%ext%" -u Twitter
(note the quotes around the percent) That did it, thanks!
Hello, great program you got here! Used it a couple months ago on windows to download all the media from a user's likes and it worked perfectly. Tried again today but ran into an issue with the date in the file name. Command I used was
python twitter_media_downloader.py -o out -f "[%date%] %filename%.%ext%" -s large -u <username> --since 2021-11-01 -l
and I ended up with the files in a directory...\twitterMediaDownloaderRepo\twitter_media_downloader\out\[11\06\<file>
. I think there is an issue with the date formatting, it's formatting toMM/DD/YYYY
when it used to beMM-DD-YYYY
and I think the/
is causing it to create directory when writing the file.