3 ms·
I'm not a web dev, just "know enough to be dangerous", so I have to ask: the functionality that we see is just browsing HN, but he mentions using the API to fet
by semi-extrinsic 10y ago
I'm not a web dev, just "know enough to be dangerous", so I have to ask: the functionality that we see is just browsing HN, but he mentions using the API to fetch data and that this is cumbersome. Why not just do simple wget calls (or equivalent)?
- nkozyra 10y agoIt doesn't look like it's just browsing HN, I think that's a custom view via the API.
- Uehreka 10y agoSo that approach would be called "web scraping", and was the only way to build HN-based apps and sites before they gave us an API. Many apps still do this. The API is a little cumbersome (it's totally RESTful, which means you sometimes have to make tons of HTTP requests to get enough data for a particular view), but it's much more reliable. I don't have to worry that HN might change the structure of their markup and break my app. (Bear in mind, that's not HN's markup on the page, it's new markup that I wrote using the data from HN's API.)