Closed JC-Chung closed 2 years ago
Ah it comes from @eggplants, I should have checked more carefully. Thank you for the fix.
@JC-Chung Thanks, and sorry @Ryu1845 ...
And now the log file no matter [INFO] or [ERROR] both didn't show any info about the space, only know this time download is success or fail. But I don't know how to fix it...
And now the log file no matter [INFO] or [ERROR] both didn't show any info about the space, only know this time download is success or fail. But I don't know how to fix it...
That's on me, I need to log more.
%s
in strftime is not portable.
In my environment it works. But there is possibility to raise ValueError
in other environment, especially Windows.
Ref: https://stackoverflow.com/a/11743262
Python doesn't actually support %s as an argument to strftime (if you check at http://docs.python.org/library/datetime.html#strftime-and-strptime-behavior it's not in the list), the only reason it's working is because Python is passing the information to your system's strftime, which uses your local timezone.
%f
is better.
@Ryu1845 Sorry tags again, but --write-url URL_OUTPUT
seems have small bug?
It adds url like
https://.../master_playlist.m3u8https://.../master_playlist.m3u8https://.../master_playlist.m3u8...
instead of
https://.../master_playlist.m3u8
https://.../master_playlist.m3u8
https://.../master_playlist.m3u8
...
@Ryu1845 Sorry tags again, but
--write-url URL_OUTPUT
seems have small bug? It adds url likehttps://.../master_playlist.m3u8https://.../master_playlist.m3u8https://.../master_playlist.m3u8...
instead of
https://.../master_playlist.m3u8 https://.../master_playlist.m3u8 https://.../master_playlist.m3u8 ...
I guess I have to add a \n
there
https://github.com/Ryu1845/twspace-dl/blob/main/twspace_dl/__main__.py#L86
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
strftime() Format Codes didn't have
%s
and maybe means%f Microsecond as a decimal number, zero-padded to 6 digits.
? https://github.com/Ryu1845/twspace-dl/blob/daa6ab1d1fdf5f56f4b6d95717a5c0295d8b50cc/twspace_dl/__main__.py#L35 And this is the error that use%s
Btw, the log file only write the last message like
or
but in cmd screen even have like
doesn't the two lines need write in log file, too?