mandatoryprogrammer / mandatoryprogrammer/PaperChaser

URL is not accepted.

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
47
Forks
8
PR merge metrics
No merged PRs in 30d

Description

When I run the seed file with the public google URL added, I get the following error:

Phonecian:PaperChaser skiwheelr$ node paperchaser.js crawl seed-file.txt
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:363:5)
    at onParseError (node:internal/url:536:9)
    at new URL (node:internal/url:612:5)
    at /Users/skiwheelr/PaperChaser/libs/parsing.js:135:28
    at Array.map (<anonymous>)
    at Object.get_ids_from_urls (/Users/skiwheelr/PaperChaser/libs/parsing.js:124:37)
    at Command.<anonymous> (/Users/skiwheelr/PaperChaser/paperchaser.js:52:34)
    at Command.listener [as _actionHandler] (/Users/skiwheelr/PaperChaser/node_modules/commander/lib/command.js:473:17)
    at /Users/skiwheelr/PaperChaser/node_modules/commander/lib/command.js:1173:65
    at Command._chainOrCall (/Users/skiwheelr/PaperChaser/node_modules/commander/lib/command.js:1091:12) {
  input: '',
  code: 'ERR_INVALID_URL'
}

If I replace the URL string with random text (e.g. boogieman) it does record the string.

 input: 'boogieman',
  code: 'ERR_INVALID_URL'
}

It seems to return an empty string as input only IF it is a google drive link.

Is there some structure the seed-text file should follow or is it return separated raw url text?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with libs/parsing.js, especially get_ids_from_urls around lines 124-135, and trace its call from paperchaser.js line 52. Reproduce the failure with a seed file containing the reported Google Drive URL, then verify that the crawl accepts that URL without the shown invalid-URL error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.