Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading a list of URLs as JSON file #493

Closed
asitemade4u opened this issue Apr 30, 2020 · 4 comments
Closed

Loading a list of URLs as JSON file #493

asitemade4u opened this issue Apr 30, 2020 · 4 comments
Labels
status/stale Stale issue type/question Further information is requested

Comments

@asitemade4u
Copy link

asitemade4u commented Apr 30, 2020

I am stuck with the issue #488, even when not using CDP. But replacing strings in any editor is a cinch and I can indeed save the list of pages into a JSON document, after revising it on a text editor.
How would you recommend coding a script so that Ferret accepts for input a list of URLs as a JSON document, then scrapes every item in the list?

@ziflex
Copy link
Member

ziflex commented May 2, 2020

You can pass the list using parameters.
https://www.montferret.dev/docs/fql/bind-parameters/

@ziflex ziflex added the type/question Further information is requested label May 2, 2020
@3timeslazy
Copy link
Member

3timeslazy commented May 6, 2020

@asitemade4u try this:

  • urls.json
[ "https://url.one", "https://url.two", ... ]
  • script.fql
USE IO::FS

LET input = READ("urls.json")

LET urls = JSON_PARSE(input)

FOR url IN urls
    DO_SMTH(url)

@stale
Copy link

stale bot commented Jun 5, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/stale Stale issue label Jun 5, 2020
@ziflex ziflex removed the status/stale Stale issue label Jun 5, 2020
@stale
Copy link

stale bot commented Jul 5, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/stale Stale issue label Jul 5, 2020
@stale stale bot closed this as completed Jul 12, 2020
@MontFerret MontFerret locked and limited conversation to collaborators Sep 20, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
status/stale Stale issue type/question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants