I'd like to connect to the website, then go to the account page and get my invoice.
I already some of topics but my script stills not work ...
This is my code. Do you see something wrong ? or I miss something about the connection.
Edit: I tried on another website and it's working, so I think I miss something about the connection of this website.
import requests
from bs4 import BeautifulSoup
payload = {'email_address': 'XXX@gmail.com', 'password': 'XXX'}
url = 'https://www.maxicoffee.com/login.php'
account_url = "https://www.maxicoffee.com/account.php"
with requests.Session() as session:
session.get(url)
session.post(url, data = payload)
account_page = session.get(account_url)
soup = BeautifulSoup(account_page.content, "html.parser")
invoice = soup.find("Facture imprimable")
print(invoice)