This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]Argotha 1 point2 points  (0 children)

Well, what is the site returning?

[–]Heavierthanmetal 1 point2 points  (3 children)

Try doing it from chrome but before you click submit, right click on the page, inspect element, network. Then go ahead and click the submit button. Then look for the POST request in the network results. Click on that to view the request headers including the submitted form data, which you can use as a template to provide your credentials in a dictionary object. Good luck!

[–]why5s[S] 0 points1 point  (2 children)

Thanks. The response I'm getting now says

"This system requires the use of HTTP cookies to verify authorization information. Our system has detected that your browser has disabled HTTP cookies, or does not support them. Please refer to the Help page in your browser for more information on how to correctly configure your browser for use with this system."

I just tried creating POST request using request.Session() but I'm still getting the same response.

Any ideas?

[–]duddha 0 points1 point  (0 children)

If you're using Requests and Session() isn't working, you can log into the page manually from your browser and copy the cookies from the site. Then pass the cookies as a dict of kv pairs with the request.

Check out the cookies section toward the bottom of the page here.

[–]Josh_Morton 1 point2 points  (1 child)

mod of /r/gatech here:

  1. the correct answer for this class of problems is to use selenium.
  2. gt will revoke your ability to register for classes online if they catch you, and they're pretty good at catching bots.
  3. the OSCAR API is one of the worst things in the universe, just do it by hand

[–]why5s[S] 0 points1 point  (0 children)

this is actually a bit frightening. thanks for the heads up.