fabon-f / fetch-site-metadata Goto Github PK
View Code? Open in Web Editor NEWHigh-performance metadata scraper
License: MIT License
High-performance metadata scraper
License: MIT License
consider NextJS fetch
const site_data = await fetchSiteMetadata(
url,
{ next: { revalidate: 30} }
);
we need to pass caching parameter
could you adjust so that in
const response = await fetch(urlString, {
signal: controller.signal
...options
})
we spread options, and in any sub-fetches also
when fresh installing and using the package it is missing dependency utils or smth
When using this library to fetch metadata on https://nextjs.org/docs/app/building-your-application/routing/router-handlers
, which normally is redirected to https://nextjs.org/docs/app/building-your-application/routing/route-handlers
, an error occurs and process fails. This doesn't happen with v0.1.3 or below.
Linux / Node.js v21.4.0 / fetch-site-metadata
v0.2.0
import fetchSiteMetadata from "fetch-site-metadata";
const url =
"https://nextjs.org/docs/app/building-your-application/routing/router-handlers";
const result = await fetchSiteMetadata(url);
console.log(result);
node:internal/webstreams/readablestream:1078
throw new ERR_INVALID_STATE.TypeError('Controller is already closed');
^
TypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed
at ReadableStreamDefaultController.enqueue (node:internal/webstreams/readablestream:1078:13)
at fetchParams.controller.resume (node:internal/deps/undici/undici:10994:45)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_INVALID_STATE'
}
Node.js v21.4.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.