https://github.com/lightfeed/extractor?tab=readme-ov-file#us...
19 karma · joined March 4, 2022
https://github.com/lightfeed/extractor?tab=readme-ov-file#us...
This library also supports HTML as input so running a browser is not required.
In this library we recover nullable and optional fields, invalid elements in nested array, bad urls, repair incomplete JSONs. If these issues are what you see, yes it should work for your case.
I know multi path LLM approaches exist: e.g. generating JSON patches
On XML vs JSON, I think the goal here is to generate typed output where JSON with zod shines - for example the result can type check and be inserted to database typed columns later
https://github.com/lightfeed/extractor/blob/main/src/convert...
I have used gemma 3 and had good results.
Once Gemini 3 flash drops the preview suffix, will update the examples. Thank you for the pointer.
price: z.number().optional() -> price: “n/a”
url: z.string().url().nullable() -> url: “not found”
It can also be one invalid object (e.g. missing required field, truncated input) in an array causing the entire output to fail.
The unique contribution here is we can recover invalid nullable or optional field, and also remove invalid nested objects in an array.
I will add a PR to enforce robots.txt before the actual scraping.
We see this especially with arrays of objects where each object has optional nested fields. For complex nested objects, the model can get all items well formatted but one with an invalid field of wrong type. That's why we put effort into the repair/recovery/sanitization layer — validate field-by-field and keep what's valid rather than throwing everything out.
Our main use case is retail price monitoring — comparing publicly listed product prices across e-commerce sites, which is pretty standard in the industry. But fair point, we should make that clearer in the README.
Our main use case is retail price monitoring — comparing publicly listed product prices across e-commerce sites, which is pretty standard in the industry. But fair point, we should make that clearer in the README.
I see your confusion on pricing. It will be a paid service given the storage and LLM cost. I put "10 day free trial" under the main action button. Hope it can clarify a bit.
Have you thought about automatically extract schema?
It filters and summarizes stories using LLM and your prompt on any site including HN!
Hope there are cleaner ways