6 Replies - 353 Views - Last Post: 30 May 2019 - 07:42 PM

#1 littlebigman   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 52
  • Joined: 09-February 10

JavaScript to download and parse remote web page?

Posted 30 May 2019 - 05:17 AM

Hello,

I only have shallow experience with Javascript.

Before going ahead, I'd like to check with the experts if Javascript is a good solution for the following tasks, or it just won't do and I should consider a server-side language instead:

1. Display form and let user select options
2. On Submit, build URL
3. Call URL, and retrieve web page
4. Parse web page, and display contents.

Thank you.

Is This A Good Question/Topic? 0
  • +

Replies To: JavaScript to download and parse remote web page?

#2 Catacombs   User is offline

  • New D.I.C Head

Reputation: 9
  • View blog
  • Posts: 44
  • Joined: 24-May 19

Re: JavaScript to download and parse remote web page?

Posted 30 May 2019 - 08:25 AM

This sounds like an API, which you can build in Node.js, if you choose.
Was This Post Helpful? 0
  • +
  • -

#3 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2334
  • View blog
  • Posts: 7,111
  • Joined: 15-January 14

Re: JavaScript to download and parse remote web page?

Posted 30 May 2019 - 01:03 PM

For Javascript running the browser, there will be limitations on whether or not the browser will send a request to a different domain.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15109
  • View blog
  • Posts: 60,436
  • Joined: 12-June 08

Re: JavaScript to download and parse remote web page?

Posted 30 May 2019 - 01:06 PM

I would also be keen on reading the terms of use for any page you are scraping. Certainly don't want to be a Negative Nelly doing wrong.
Was This Post Helpful? 0
  • +
  • -

#5 Catacombs   User is offline

  • New D.I.C Head

Reputation: 9
  • View blog
  • Posts: 44
  • Joined: 24-May 19

Re: JavaScript to download and parse remote web page?

Posted 30 May 2019 - 05:17 PM

View Postmodi123_1, on 30 May 2019 - 01:06 PM, said:

I would also be keen on reading the terms of use for any page you are scraping. Certainly don't want to be a Negative Nelly doing wrong.


Most pages don't like scrapers. My position is scrape now and ask for forgiveness later.
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15109
  • View blog
  • Posts: 60,436
  • Joined: 12-June 08

Re: JavaScript to download and parse remote web page?

Posted 30 May 2019 - 05:44 PM

I would disagree. I like to apply my ethics upfront.
Was This Post Helpful? 1
  • +
  • -

#7 Catacombs   User is offline

  • New D.I.C Head

Reputation: 9
  • View blog
  • Posts: 44
  • Joined: 24-May 19

Re: JavaScript to download and parse remote web page?

Posted 30 May 2019 - 07:42 PM

Eh. Tight deadlines say otherwise but to each their own.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1