I read instructions a lot of times maybe i am bit idiot, but anyway:
Code: Select all
import requests
from bs4 import BeautifulSoup
s = requests.session()
data = s.get('https://www.factorio.com/login')
soup = BeautifulSoup(data.content, 'html.parser')
token = soup.find_all('input', id='csrf_token')[0]['value']
newdata = s.post('https://www.factorio.com/login?csrf_token='+str(token)+'&username_or_email=&password=')