I did mention that may need to parse out that value.
You should try to this this yourself.
It can be done like this.
Untested it can look like this.
You should try to this this yourself.
It can be done like this.
import requests from bs4 import BeautifulSoup url = 'http://dls.delonghigroup.com/index.php?lang=it' response = requests.get(url) soup = BeautifulSoup(response.content, 'lxml') token = soup.find(attrs={"value": "1"}) print(token.get('name'))
Output:e45d72564cc455fcd22d1fc7e85d71f9
Also this has to be done in same Session,as a new value is generated each time.Untested it can look like this.
import requests from bs4 import BeautifulSoup headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36' } with requests.Session() as s: url = 'http://dls.delonghigroup.com/index.php?lang=it' response = s.get(url) soup = BeautifulSoup(response.content, 'lxml') token = soup.find(attrs={"value": "1"}) #print(token.get('name')) params = { "username": "your_username", "password": "xxxxxxx", "option": "com_users", "task": "user.login", "return": "aW5kZXgucGhwP0l0ZW1pZD0xMDE=", f"{token.get('name')}": "1" } s.post('http://dls.delonghigroup.com/index.php?lang=it', headers=headers, params=params) # logged in! session cookies saved for future requests response = s.get('url acess when logged in') # Can eg do some parsing soup = BeautifulSoup(response.content, 'lxml') welcome = soup.find('span', class_="welcome").text print(welcome)