I am working on a project where I have inherited some code that logs into a website using python's 'requests' library and scrapes the site for content. The 'login' code utilizes a backend URL to POST credentials to an endpoint. (Works fine)
There is another part of the site, however that does not have a backend URL. It just has a form where a pin number need to be entered to access data. Below is the div code
<input class="form-control" type="password" placeholder="Enter your
PIN number" id="pin" style="width:200px; float:left; display:inline;"
onkeypress="testPinEntry(event);">
<a id="pin_verify" style="float:left; clear:none; height:34px;" class="btn-
glow primary login" href="#" onclick="verify_pin();">Verify PIN</a>
Does anyone know of a good way to use the requests library to input the data and press the button ? My inclination is to use the xpath and go from there (I'm pretty familiar with writing scapers - https://github.com/1jkunz1/MLB-Sabermetrics-Scraper/blob/master/src/scraper.py)
I really don't want to use selenium for this task because I don't want the project to be dependent upon it, but most of the solutions I've been able to find seem to prefer selenium.