Artist playlist pages have different format compared to user playlists,
thus more format checking is needed to construct the correct URL.
From the artist playlist this method downloads all listed below the
"Videos by [Artist Name]" header, plus usually there's one more
video on the side, titled "Youtube Mix for [Artist Name]", which
has a link format that currently cannot be distinguished from the other
videos in the list.
Since I was very lazy when I coded this, I took the fastest route. Luckily,
Vasyl' Vavrychuk pointed this out and I went (after many months) and just
did some minor changes.
This file stamp setting is very relaxed. If there's any problem
along the way (no last-modified header, bad time string format,
no time set privileges,...) or if nothing is downloaded (e.g. using
resumed download but the file was already complete) then nothing
is done.
When using youtube-dl within scripts, it is very useful to know
what will be the final output filename with all the title settings and
filename templates applied. Add option to the quiet mode operations
to print that info.
For this I had to move the filename-generation into its own function.
As much as I can tell it should work almost always well, ie. not to
break things if one not actually interested in the title, like in
case of other forced printing. That is, unless there's an invalid
system charset or the user specified a wrong output template. In that
case probably could be assumed that the user does have a problem
(the former) or did want to mess with the filename (the latter).
Signed-off-by: Gergely Imreh <imrehg@gmail.com>
Following error happen while at the end of _do_download called try_rename
WindowsError: [Error 32] The process cannot access the file because it is being used by another process
Fixed several problems courtesy of jamiejones:
The parsing for the SWF url was wrong (the "//" are now escaped and the
initial .*match needs to be 'ungreedy'), so the -W setting to rtmpdump
was not set, causing the decryption of the video to be wrong.
Finally, add "&has_verified=1" to the fetch of the HMTL page to
allow fetching of age-restricted videos.