Tip to anyone ever planning to work with parsing website output:
Take an API if you can.
Rambling about sites that are NSFW Show more
So this is a tip for all you webdevs out there:
- Provide your API in JSON. XML gives me 20 ways and more to get my data and it's a pain to figure out how to do so in ETree. Contrast JSON which I can parse to a dict in a single command. (Faulty: Paheal)
- If you're gonna do pagination, report back how many pages or at the very least how many resources there are on a page and the total resource count (Faulty: Nhentais old API)
- Finally, DOCUMENT YOUR API SPEC! While usually I can figure out a lot from a list of endpoints, a proper API spec tells me everything I can expect and need to know for a project. (Faulty: Too fucking many to count.)
To close this one off, I know documentation is hard (in fact, I hate documentation myself, go figure!)
That said, even if you just give me the list of every parameter that's valid at an API endpoint, that already saves me soooo much time. I can test the output with something like http-prompt in such a situation and get the rest from it myself, but at the very least provide this basic thing.
It's like Twitter but you can like host it yourself n crap. This instance will probably contain high dosages of weeb. TO GET APPROVED, READ THE ABOUT PAGE!