Follow

Whenever I have a problem, I see if I can write some code to automate it. I need a new place and was tired of searching listings manually so I wrote a scraper that’s going over listings. For getting the data out of the scraped html page I’m using XPath queries. That means I now have a whole bunch of other problems and the original problem is pushed back!

Yak shaving for the win, I guess

I realize this sounds a bit strange probably, but I feel writing regexes is a lot easier than xpath queries. There are so many possibilities and built-in functions in xpath, and I simply don’t use it enough to be fluent. I probably do 2-3 very simple regex a week, so most of the time I actually get them to work on first try.

Show thread
Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!