article-extractor
article-extractor copied to clipboard
Specific site work with deno but not node
hello !
i opened #368 for the exact reverse reason last week, this time the deno example works but not node :upside_down_face:
https://reporterre.net/Arnaud-Begin-l-inspecteur-nucleaire-qu-EDF-veut-faire-taire
getting
{
"error": 1,
"message": "Request failed with error code 403",
"data": null,
"meta": {
"service": "article-parser",
"lang": "javascript",
"server": "express",
"platform": "node"
}
}
Yes, it seems the examples need to be updated now (node, ts-node and bun).
Not sure about the root cause. Maybe some updates from Node's built-in fetch module?
However regular usage still works for me.
what do you mean "regular usage work" ? by passing a url directly into extract ? or passing a html doc into extraxthtml ?
Is there an update on this issue? I am also facing a similar Error: Request failed with error code 403 in node 20.
I'm getting 403 on this specific url https://www.politico.com/news/2024/05/04/republicans-state-department-investigations-00156077 on my machines.
Your demo website seems to fetch it just fine though.
@Finalet 403 Forbidden error means that your request has been denied by target server. Maybe the server (location) where your script runs is currently blocked. Using a proxy service can help. My demo website works because it's located in a region that isn't blocked.
@ndaidong the original issue was about it working with the deno version but not the node one, both on the same network
just re tested:
- node doesn't work
- bun works
- deno:
Task dev deno run --allow-net --allow-env --allow-read index.ts
error: Import 'https://esm.sh/v135/https:@latest/denonext//deno.land/x/[email protected]/deno-dom-wasm.ts.js' failed: 400 Bad Request
at https://esm.sh/@extractus/[email protected]:4:8
- tsnode works