Git Product home page Git Product logo

recatchable's People

Contributors

lapwat avatar radmen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

radmen

recatchable's Issues

Unhandled Promise Rejection Warning / Connection error

Very cool project!! I installed and successfully ran your test command. Then I tried to use this to scrape some recipes, and I get the below error... Any help is appreciated!

./index.js -b https://www.halfbakedharvest.com -h /category/recipes -s .recipe-block
Found 12 pages in the table of content

Downloading Recipes Index - Half Baked Harvest...
(node:39739) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 23.200.237.230:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:39739) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:39739) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Promise rejection

Hi! I think I'm using it correctly with the selector, but I ran into the following issue (similar to the previous issue).. Thanks!

(base) briankaemingk@brians-MacBook-Pro reCatchable % ./index.js -h https://tldp.org/HOWTO/Software-Building-HOWTO.html -s 'a[name*="toc"]'
Found 17 pages in the table of content.
Downloading Building and Installing Software Packages for Linux...
(node:14981) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_URL]: Invalid URL: 
    at onParseError (internal/url.js:258:9)
    at new URL (internal/url.js:334:5)
    at Object.urlFilter (/Users/briankaemingk/Documents/reCatchable/utils/scraper.js:58:13)
    at Scraper.requestResource (/Users/briankaemingk/Documents/reCatchable/node_modules/website-scraper/lib/scraper.js:204:47)
    at tryCatcher (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/map.js:68:38)
    at MappingPromiseArray.PromiseArray._iterate (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/promise_array.js:115:31)
    at MappingPromiseArray.init (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/promise_array.js:79:10)
    at MappingPromiseArray._asyncInit (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/map.js:37:10)
    at _drainQueueStep (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:461:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:14981) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 18)
(node:14981) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(base) briankaemingk@brians-MacBook-Pro reCatchable % 
(base) briankaemingk@brians-MacBook-Pro reCatchable % 
(base) briankaemingk@brians-MacBook-Pro reCatchable % 
(base) briankaemingk@brians-MacBook-Pro reCatchable % ./index.js -h https://tldp.org/HOWTO/Software-Building-HOWTO.html -s 'a[name*="toc"]'
Found 17 pages in the table of content.
Downloading Building and Installing Software Packages for Linux...
(node:15024) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_URL]: Invalid URL: 
    at onParseError (internal/url.js:258:9)
    at new URL (internal/url.js:334:5)
    at Object.urlFilter (/Users/briankaemingk/Documents/reCatchable/utils/scraper.js:58:13)
    at Scraper.requestResource (/Users/briankaemingk/Documents/reCatchable/node_modules/website-scraper/lib/scraper.js:204:47)
    at tryCatcher (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/map.js:68:38)
    at MappingPromiseArray.PromiseArray._iterate (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/promise_array.js:115:31)
    at MappingPromiseArray.init (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/promise_array.js:79:10)
    at MappingPromiseArray._asyncInit (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/map.js:37:10)
    at _drainQueueStep (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:461:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:15024) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 18)
(node:15024) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Could not upload book, book name may already exists.

This tool is cool! I'm running into an issue when trying to upload though. Any ideas?

λ: ./index.js -h https://vitalik.ca/ -u
No selector specified, inserting home page only.
Found 1 pages in the table of content.
Downloading  Vitalik Buterin's website ...
Extracting clean content from HTML sources...
+ Page 1: Vitalik Buterin's website
Creating book...
Zipping temp dir to  Vitalik Buterin's website .epub
Done zipping, clearing temp dir...
+ Book saved to  Vitalik Buterin's website .epub
Token not found in (/*repo location*/)/recatchable/remarkable.token. Initiating connection process...
Enter one-time code displayed at https://my.remarkable.com/connect/desktop: (/*remarkable code*/)
Attempting connection...
Could not upload book, book name may already exists. HTTPError: Response code 400 (Bad Request)
    at Request.<anonymous> (/(/*repo location*/)/recatchable/node_modules/got/dist/source/as-promise/index.js:117:42)
    at processTicksAndRejections (node:internal/process/task_queues:94:5) {
  code: undefined,
  timings: {
    start: 1614973418850,
    socket: 1614973418850,
    lookup: 1614973418851,
    connect: 1614973418862,
    secureConnect: 1614973418902,
    upload: 1614973418902,
    response: 1614973419636,
    end: 1614973419636,
    error: undefined,
    abort: undefined,
    phases: {
      wait: 0,
      dns: 1,
      tcp: 11,
      tls: 40,
      request: 0,
      firstByte: 734,
      download: 0,
      total: 786
    }
  }
}

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.