Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update User-Agent, disable username/password prompt, and added [FFMPEG]-pix_fmt yuv420p to fix colors #1281

Merged
merged 4 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions PixivConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class PixivConfig():
ConfigItem("Network", "useProxy", False),
ConfigItem("Network", "proxyAddress", ""),
ConfigItem("Network", "useragent",
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36"),
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0"),
ConfigItem("Network", "useRobots", True),
ConfigItem("Network", "timeout", 60),
ConfigItem("Network", "retry", 3),
Expand Down Expand Up @@ -178,7 +178,7 @@ class PixivConfig():
ConfigItem("FFmpeg", "ffmpeg", "ffmpeg.exe"),
ConfigItem("FFmpeg", "ffmpegCodec", "libvpx-vp9"),
ConfigItem("FFmpeg", "ffmpegExt", "webm"),
ConfigItem("FFmpeg", "ffmpegParam", "-lossless 0 -crf 15 -b 0 -vsync 0"),
ConfigItem("FFmpeg", "ffmpegParam", "-lossless 0 -crf 15 -b 0 -vsync 0 -pix_fmt yuv420p"),
ConfigItem("FFmpeg", "mkvCodec", "copy"),
ConfigItem("FFmpeg", "mkvParam", ""),
ConfigItem("FFmpeg", "webpCodec", "libwebp"),
Expand Down
16 changes: 9 additions & 7 deletions PixivUtil2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1716,16 +1716,18 @@ def main():
if __config__.useLocalTimezone:
PixivHelper.print_and_log("info", f"Using local timezone: {PixivHelper.LocalUTCOffsetTimezone()}")

print("Username login is broken, use cookie to log in.")

username = __config__.username
if username == '':
username = input('Username ? ').rstrip("\r")
else:
msg = f'Using Username: {username}'
PixivHelper.print_and_log('info', msg)
# if username == '':
# username = input('Username ? ').rstrip("\r")
# else:
# msg = f'Using Username: {username}'
# PixivHelper.print_and_log('info', msg)

password = __config__.password
if password == '':
password = getpass.getpass('Password ? ')
# if password == '':
# password = getpass.getpass('Password ? ')

if np_is_valid and options.number_of_pages != 0: # Yavos: overwrite config-data
PixivHelper.print_and_log("info", f'Limit up to: {options.number_of_pages} page(s). (set via commandline)')
Expand Down