5 ms·
> a little script that logs into my bank I've wanted to do something like this for so long but it just seems so painful. How do you do this with just a little
by mehrdadn 8y ago
> a little script that logs into my bank
I've wanted to do something like this for so long but it just seems so painful. How do you do this with just a little script when there's so much Javascript involved in the page, as well as random interjections like random extra security verification steps? Do you have a particularly scrape-friendly bank?
- vbezhenar 8y agoTry to watch network requests in developer console of your browser. Sometimes there's a simple REST interface behind that JavaScript and all you need is to login and issue one request. Extra security verification steps probably won't let you do that, though, if implemented correctly.
- uptown 8y agoYou can emulate a user driven browser using a headless instance of Chrome. Look up some “chromedriver” tutorials. Hooks together nicely with Selenium.
- mehrdadn 8y agoIn theory, yeah. I actually did try Selenium and Chrome several months or maybe a ~year ago. I don't remember exactly what the pain points were but I remember it was really painful to figure out how to get it to work. Everything from figuring out how to inject JS into a page to figuring out how to wait for events, etc. it was just a massive pain. I don't think I ever figured it out entirely.