Giter VIP home page Giter VIP logo

Comments (5)

manuth avatar manuth commented on June 11, 2024 1

Hey @s0ph1e
Thanks for the rapid answer 😄

Sorry for the inconvenience, I'll describe the steps for the reproduction real quick.

  1. Create an empty directory
    mkdir scrape-test && cd scrape-test
  2. Create package.json as described below
  3. Run npm install
  4. Create index.js file as described below
  5. Run the script using node ./index.js
  6. Take note that everything works as expected
  7. cd into a directory which does not contain a package.json (for example cd ..)
  8. Run the script again node ./scrape-test/index.js
  9. Take note that an running the script triggers an error now

Assets

package.json:

{
  "type": "module",
  "dependencies": {
    "website-scraper": "^5.3.0"
  },
  "devDependencies": {
    "@types/node": "^18.7.23",
    "@types/website-scraper": "^1.2.6"
  }
}

index.js

import { join } from "path";
import { fileURLToPath } from "url";
import websiteScraper from "website-scraper";

(
    async () =>
    {
        await websiteScraper(
            {
                directory: join(fileURLToPath(new URL(".", import.meta.url)), "output"),
                urls: [
                    "https://nodejs.org"
                ]
            });
    })();

from node-website-scraper.

s0ph1e avatar s0ph1e commented on June 11, 2024 1

Thanks @manuth 👍

I'll try to reproduce and fix it during next 1-2 weeks

If anyone wants to contribute - PRs are welcome

from node-website-scraper.

s0ph1e avatar s0ph1e commented on June 11, 2024 1

The bug was fixed and released in v5.3.1

from node-website-scraper.

s0ph1e avatar s0ph1e commented on June 11, 2024

Hi @manuth 👋

Thank you for reporting the problem
Could you please share the steps to reproduce this issue? How do you run your application?

from node-website-scraper.

manuth avatar manuth commented on June 11, 2024

Awesome! 😄 Thanks for the rapid fix

from node-website-scraper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.