Use os.path.join() for joining paths rather than +'/'+.
os.path.join() uses '/' on Unix-ish and '\' on Windows. On Windows, this makes
the following improvements:
- Visual consistency with / and \ not being mixed-up in one path (os.path.join()
has already been used in many places).
- Allow using the \\?\ bypass method, e.g. with
--dirname-pattern=\\?\D:\{target}
The \\?\ bypass method fails when '/' is used as path separator. With the \\?\
bypass method, we can create directories whose name would otherwise be
considered invalid, such as directories starting with "aux.".
- Keep documentation in sync with master branch
- Run PyLint and MyPy on Github Actions
- Update Issue templates, enforce usage of issue templates, add links to
resources in Instaloader Documentation
- Update contributing.rst
If logged-in, Post.url and Post.get_sidecar_nodes() now use the iPhone API
endpoint to obtain the highest-resolution image version. Resolves #630.
A notice "Warning: Use --login to download higher-quality versions of pictures"
is issued if the user tries to download posts without being logged-in.
Further, the message "Errors occurred:", which is displayed when the
InstaloaderContext is closed, has been changed to "Errors or warnings
occurred:".
The presence of a sessionfile avoids the usage of the failure-prone login
mechanism. This commit addresses a suggestion in #615 to store the sessionfile
in a persistent path rather than a path within a temporary directory if no
--sessionfile parameter is given.
The default path is now:
$XDG_CONFIG_HOME/instaloader/session-USERNAME or
~/.config/instaloader/session-USERNAME on Unix,
%LOCALAPPDATA%\Instaloader\session-USERNAME on Windows.
If no file exists in the new path, Instaloader tries loading from the path
where the sessionfile was stored before this commit, hence it automatically
migrates to the new sessionfile path.
Only substitute characters from auto generated fields in _PostPathFormatter
This fixes issues of path problem on Windows such as #304, #529, etc.
Also made the following changes:
1. Changes substitution of colon to full-width colon (U+FF1A) instead of MODIFIER LETTER COLON (U+A789) to be consistent with others (we use full-width backslash, pipe, etc. already).
2. Also replaces `\r` on Windows with space, just like `\n`.
Without passing re.ASCII, \w matches non-ascii letter, such as ö, π
and я, which to my knowledge isn't allowed in usernames. Now it's
explicit which character ranges are expected in each target.