Following this answer to a similar question, I am trying to scrape a site that provides the content I need to retrieve directly after logging-in:
import requests
creds = {'username_key': 'username_value', 'pw_key': 'pw_value'}
url = 'https://mollybet.com/beta/trade'
response = requests.post(url, data=creds)
But I cannot find out from the log-in page's html what the username's and password's key values need to be and the status_code
I keep getting in the response
object is 405
(Not Allowed
).
- Is it obvious from the tags in the
html
code what thekey
values need to be or am I completely off in the way I am trying to resolve this issue?
I also tried logging-in with selenium
(chromedriver
) and, again, I cannot I identify the input field elements. For example, although this code does locate the element I am targeting in the log-in page
from selenium import webdriver
webdr_browser = webdriver.Chrome()
webdr_browser.get(url)
soup = bs.BeautifulSoup(webdr_browser.page_source,'lxml')
>>> soup.find('input', class_='jss91 jss76')
<input aria-invalid="false" class="jss91 jss76" type="text" value=""/>
But when I am trying to locate the element in order to click it:
>>> webdr_browser.find_element_by_class_name('jss91 jss76')
Traceback (most recent call last):
...
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".jss91 jss76"}
Other find_element_by_
methods also fail so,
- Any idea why?