Clone the repository or download the zip folder :
git clone https://github.com/arnavbansal2764/wikipagextract.git
Open the folder and install dependencies
cd wikipagextract
npm install
Replace the existing url in typescript file with your desired url
const wikipediaUrl = 'your_url';
fetchWebpage(wikipediaUrl).then(html => {
const content = extractContent(html);
saveContent(content, wikipediaUrl);
});
Build the typescript file
The code will run and create an output folder in the main directory which will have all the text urls and images.