techtanic/Discounted-Udemy-Course-Enroller

[Bug]: TypeError: 'NoneType' object is not subscriptable

bugbounted opened this issue · 11 comments

What happened?

Trying to login
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\CLI\duce.py", line 642, in
head, user, currency, s, txt = check_login(email, password)
File "C:\Users\Administrator\Desktop\CLI\duce.py", line 358, in check_login
csrf_token = soup.find("input", {"name": "csrfmiddlewaretoken"})["value"]
TypeError: 'NoneType' object is not subscriptable

Enroller

CLI

OS

Windows

Relevant log output

Trying to login
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\CLI\duce.py", line 642, in <module>
    head, user, currency, s, txt = check_login(email, password)
  File "C:\Users\Administrator\Desktop\CLI\duce.py", line 358, in check_login
    csrf_token = soup.find("input", {"name": "csrfmiddlewaretoken"})["value"]
TypeError: 'NoneType' object is not subscriptable

Terms

  • I am using the latest version available.
  • I agree to follow this project's Code of Conduct

replace
csrf_token = soup.find("input", {"name": "csrfmiddlewaretoken"})["value"]
with
csrf_token = r.cookies["csrftoken"]

This Issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This Issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This Issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This Issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This Issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

I'm having the same issue. Any fix?

This Issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This Issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This Issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This Issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.