Linked Questions

0 votes
1 answer
1k views

How to Login to a website and hit any url and get the response by using Python [duplicate]

I am logging into website by using below code... payload = {'user': 'apple', 'password': 'banana'} loginurl = 'http://12.345.678.910:8000/login' r = requests.post(loginurl, data=payload) data = r....
SG131712's user avatar
  • 135
1 vote
0 answers
422 views

Python3.x how to stay logged in using requests? [duplicate]

I have following code: def login(self): print('Log in ...') # Open log in page and get request key # --------------------------------------------------------------------------------------...
Shiloh_C's user avatar
  • 197
-1 votes
1 answer
159 views

how to login a user to my website and know if he is logged in [duplicate]

https://repl.it/@rafrafraf/project-server https://repl.it/@rafrafraf/Project I'm basically confused about how to log in a user to my website and know if he is still logged in on page switch while ...
Rafi Asmoucha's user avatar
0 votes
0 answers
52 views

Can't POST after successful Login [duplicate]

I want to login to the web page and find a car by plate. This is my code. I manage to login to page with req but after I make req2 the response I get is login page as I just opened the page and need ...
Chaban33's user avatar
  • 1,372
84 votes
5 answers
136k views

python: urllib2 how to send cookie with urlopen request

I am trying to use urllib2 to open url and to send specific cookie text to the server. E.g. I want to open site Solve chess problems, with a specific cookie, e.g. search=1. How do I do it? I am ...
Oleg Tarasenko's user avatar
6 votes
1 answer
23k views

Consecutive requests with python Requests.Session() not working

I was trying to do this, import requests s=requests.Session() login_data = dict(userName='user', password='pwd') ra=s.post('http://example/checklogin.php', data=login_data) print ra.content print ra....
Mayank Jha's user avatar
1 vote
2 answers
4k views

Login to site using CSRF token using Go/Python

I want to backup automatically web content from a site which requires login. I try to login by simulating a POST request. But I get the error: csrf token: CSRF attack detected Here are some extracts ...
Erik Engheim's user avatar
  • 8,402
3 votes
1 answer
5k views

How to use Python Requests to login to website, store cookie, then access another page on the website?

I'm trying to login into website using a Python script, store the cookie I receive, and then use that same cookie to access member-only parts of the website. I've read several posts and answers about ...
Jacob Marshall's user avatar
2 votes
2 answers
3k views

How to scrape a page if it is redirected to another before

I am trying to scrape some text off of https://www.memrise.com/course/2021573/french-1-145/garden/speed_review/?source_element=ms_mode&source_screen=eos_ms, but as you can see when it loads up the ...
Jack's user avatar
  • 451
0 votes
1 answer
3k views

How to get a session cookie in python

I'm trying use python to download a file from a site, which can only be downloaded after you login, which seems to be working OK! But when I actually try to download the file, I only receive a text ...
Vini.g.fer's user avatar
  • 11.8k
0 votes
2 answers
3k views

Trying to Scrape from website with login Python

I am trying to scrape my data from a website that requires a login but I keep getting the following error: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>...
GCIreland's user avatar
  • 155
2 votes
2 answers
773 views

requests.post from python script to my Django website hosted using Apache giving 403 Forbidden

My Django website is hosted using Apache server. I want to send data using requests.post to my website using a python script on my pc but It is giving 403 forbidden. import json url = "http://54.161....
Kushal Vijay's user avatar
0 votes
1 answer
2k views

Python requests. How to stay logged in?

I am new to web scraping and would like to learn how to do it properly and politely. My problem is similar to [this][1]. 'So I am trying to log into and navigate to a page using python and requests. ...
Mirit's user avatar
  • 33
1 vote
1 answer
2k views

How to get the headers behind a login?

I am trying to create a bot to post message on a plateforme that requires login. I have done several reading online but I can't figure what the exactly the headers in a python requests stand for and ...
Solal's user avatar
  • 701
0 votes
1 answer
1k views

Logging in to a site using Python Requests

I am trying to programmatically log into this site using the Python Requests library: login_url='https://login.drexel.edu/cas/login?service=https://one.drexel.edu/c/portal/login' login_payload = { ...
theGreenCabbage's user avatar

15 30 50 per page