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

Crash while trying to log in #4

Open
Muha0644 opened this issue Dec 18, 2021 · 1 comment
Open

Crash while trying to log in #4

Muha0644 opened this issue Dec 18, 2021 · 1 comment

Comments

@Muha0644
Copy link

So basically when I tried to run python main.py artwork, it crashed. This is the error it threw:

Traceback (most recent call last):
  File "/home/muha0644/pixiv-scraper/main.py", line 67, in <module>
    main()
  File "/home/muha0644/pixiv-scraper/main.py", line 46, in main
    download_users(api, config, args.option)
  File "/home/muha0644/pixiv-scraper/main.py", line 9, in download_users
    api.login(config.username, config.password)
  File "/home/muha0644/pixiv-scraper/lib/pixiv.py", line 33, in login
    post_key = re.search(r"post_key\" value=\"(.*?)\">", res.text)[1]
TypeError: 'NoneType' object is not subscriptable

The fix was simple, I just removed the [1] from that line and it seems to work, although that is because it doesn't log you in...
I am using Arch Linux, and everything is updated to the latest version as of posting this issue.

@AK3847
Copy link

AK3847 commented Jan 30, 2024

Thanks for the quick fix, was getting the same error when running on windows 11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants