Ganzer Code
from bs4 import BeautifulSoup
import requests
import re
TEAM_NAME = "hoge"
payload = {
'signin': "1",
'email': 'email',
'password': 'password'
}
login_url = 'https://%s.slack.com/' % TEAM_NAME
#Rufen Sie die Anmeldeseite auf
session = requests.Session()
response = session.get(login_url)
#Holen Sie sich Krümel
bs = BeautifulSoup(response.text)
auth_token = bs.find(attrs={'name': 'crumb'}).get('value')
payload['crumb'] = auth_token
#Anmeldung
session.post(login_url, data=payload)
Recommended Posts