I am having trouble trying to webscrape instacart using the requests library in python. I want to get past the first initial page that asks for the zip code and move onto the email page. Here is my code:
import requests
session = requests.Session()
data = {"address_line_1":"MYZIPCODE"}
header = {'user-agent': "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B179 Safari/7534.48.3"}
response = requests.post('https://www.instacart.com/', headers=header, data=data)
print(response.text)
I was wondering if you guys could help.
BTW: I am using address_line_1 because that is the name of the input.
Thanks