Ask HN: What you up to? (Who doesn't want to be hired?)
614 pointsInstead of talking jobs, what is everyone up to otherwise? Any interesting going on in life or with your hobby project?
Unfinished and novel ideas are of course most interesting, so feel free to share anything you're thinking about!
Comments (841) 296 threads
Show all comments
Showing thread 19 of 296
Web-scraping and reverse-engineering is such a brilliant subject in my opinion and there's an unsurprising lack of resource in this area as it's a rather secretive medium - as a good scraping/reverse engineering strategy is often considered to be a business secret.
It started off as a need to not repeat myself on stackoverflow. Web-scraping is a common question subject and the same questions would be asked over and over again. I couldn't find explicit resources available so I wrote them myself! Now I'd often answer question with specifics and point to full article for further reading which people seem to appreciate and come back with follow ups less often.
I'm still working out the kinks - especially pacing, brevity and editing - though it has been a really enjoyable ride so far. Finally as a backend engineer it finally got me to get over the front-end hump. I've learned some pretty css and general web building - it's often frustrating but surprisingly fun!
I've always had the luxury of paid quality proxies in my web-scrapers however for article purposes I'd like to have an example of cheap or free proxies for casual usage/education. Are you using something in particular?
One idea I've explored was using VPN service as a proxy but seems like most big VPN providers are not providing proxies anymore.
Anyway, I can PM you once I figure out how to put this together properly! :)
I configured an Alpine Linux docker container with openvpn and a proxy server (I think I settled on squid for stability), and a bash script to to start up the openvpn connection and proxy server with config for both passed into the container. Then just generated a long, line by line list of every possible vpn connection config line by line, shuffled and duplicated.
Then in my outer scraping function: grab a line from the config file, start up a vpn-proxy container (passing in the config), do one page download through the container proxy and then stop and delete the docker container. This allowed me to download pages in parallel, with all connections originating from different IP addresses (as long as I made sure not to exceed VPN simultaneous connection limits).
Kinda messy, and I spent ages fiddling to get the container config just right, but it worked.
Continue this thread — 1 reply