Answer the question
In order to leave comments, you need to log in
How to parse data from a site with registration through bs4?
I can not parse data from a site with registration (with an entrance). There is a login, password, but the data is not parsed. I'll attach the code, but nothing is displayed, only an empty array
import requests
from bs4 import BeautifulSoup
url = 'https://www.agrokeep.com/#/station/data'
s = requests.Session()
r = s.get(url)
data = {
'login': 'тут был логин, но я его убрал',
'password': 'тут был пароль, но я его убрал',
}
d = s.post(url, data=data, headers=dict(Referer=url))
soup = BeautifulSoup(d.text, 'lxml')
quotes = soup.find_all('button', class_='btn btn-default ng-binding dropdown-toggle')
print(quotes)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question