Ask HN: What automation tools have you used to replace mundane activities?
408 pointsFor my travel site side hustle (beatthatflight.com.au/), I find and publish cheap flights for Australians. Sounds simple, but even if say, someone gave me the flights each day, there's posting the, sometimes to deals sites, as well as then editing it and posting it on my site, and out to social media, and then to specific mailing lists on mailchimp, depending on the source city of the deal, or type of post.
A LOT of that becomes tedious. Mailchimp can auto post to FB/twitter/instagram etc, but even converting the blog post into mailchimp emails gets tiring, as you need to choose a feature photo, the specific mailing list etc.
I'm a selenium guy, so have built some scripts to minimise some of it, but the rush each time of finding a deal still pains me when I think of the tedium ahead of publishing it.
Ideally, my goal would be to submit [to][from][when] to a script and the whole process would be automatic. I can see that selenium could do it, but my goodness, it'd be slow and potentially flaky all via the web UI for those sites.
I'd love suggestions, examples of automation you've done, and tools used?
Comments (229) 59 threads
Show all comments
Showing thread 11 of 59
Its a browser plugin that allows you to record and playback anything that you do in your browser.
https://selenium.dev/selenium-ide/
There is a right-click action to record hovering over a section if it is hidden by css, its a well-known gotcha in wordpress admin listings and other sites that love to hide until you hover over a section.
I've still to look into whether the file format that is saved from selenium ide could be used within a virtual browser like phantomjs or the like.
For direct scraping, i tend to go straight to xpath with dom.
Its far more reliable than trying to get stuff out via regular expressions, that i only use when i need to get a certain part of the node value from a text node.
I used to use php for that, but i wrote my own programming language that uses a library called htmlquery (its a go library)
https://github.com/antchfx/htmlquery
If i have to login, i fake each request with the correct headers. Plenty of libraries around that help with that for every language.