7 Replies - 338 Views - Last Post: 07 November 2017 - 08:14 AM Rate Topic: -----

#1 foxy773  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 04-July 15

How to extract text from this website?

Posted 07 November 2017 - 06:53 AM

I want to extract the text from the answer at this site: https://www.ung.no/o...jon/246598.html
The answer is in the box where it stands "Svar"

My current code is
RichTextBox1.Text = WebBrowser1.document.GetElementById("content-start").InnerText

But this only gives me the Question that is being asked. And there is no ID for the answear, there is only a class. How can i extract the answer?

Thanks ;)/>

Is This A Good Question/Topic? 0
  • +

Replies To: How to extract text from this website?

#2 andrewsw  Icon User is offline

  • the case is sol-ved
  • member icon

Reputation: 6374
  • View blog
  • Posts: 25,756
  • Joined: 12-December 12

Re: How to extract text from this website?

Posted 07 November 2017 - 07:11 AM

Describe where the answer is in relation to the content-start element.
Was This Post Helpful? 0
  • +
  • -

#3 foxy773  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 04-July 15

Re: How to extract text from this website?

Posted 07 November 2017 - 07:35 AM

View Postandrewsw, on 07 November 2017 - 07:11 AM, said:

Describe where the answer is in relation to the content-start element.


The big fat title is the content-start and the answer is the "Hei jente 15 år
Takk for at du skriver til oss. Når man er 15 år kan man selv bestille legetime og snakke med legen om bruk av prevensjon. Man trenger ikke ha foreldrene med. Og når man er under 16 år er det gratis og gå til legen.

Legger ved noen artikler du kan lese.

Lykke til.



Vennlig hilsen Helsesøster"
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13483
  • View blog
  • Posts: 53,820
  • Joined: 12-June 08

Re: How to extract text from this website?

Posted 07 November 2017 - 07:51 AM

So.. scraping data - is that against their terms of use?
Was This Post Helpful? 0
  • +
  • -

#5 foxy773  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 04-July 15

Re: How to extract text from this website?

Posted 07 November 2017 - 07:54 AM

View Postmodi123_1, on 07 November 2017 - 07:51 AM, said:

So.. scraping data - is that against their terms of use?

No, i don't think so. But yes scraping data.

This post has been edited by foxy773: 07 November 2017 - 07:55 AM

Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13483
  • View blog
  • Posts: 53,820
  • Joined: 12-June 08

Re: How to extract text from this website?

Posted 07 November 2017 - 08:00 AM

I would suggest looking to see if they have an API or a developer area to use. Scraping information from websites is typically a 'no' from them.
Was This Post Helpful? 0
  • +
  • -

#7 foxy773  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 04-July 15

Re: How to extract text from this website?

Posted 07 November 2017 - 08:09 AM

View Postmodi123_1, on 07 November 2017 - 08:00 AM, said:

I would suggest looking to see if they have an API or a developer area to use. Scraping information from websites is typically a 'no' from them.


I actually don't think they have some sort of TOS. I have looked everywhere. And this is all for a school project anyway and i won't store any data i scrap.

This post has been edited by foxy773: 07 November 2017 - 08:10 AM

Was This Post Helpful? 0
  • +
  • -

#8 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13483
  • View blog
  • Posts: 53,820
  • Joined: 12-June 08

Re: How to extract text from this website?

Posted 07 November 2017 - 08:14 AM

Mkay.. it's early and my Norwegian is rusty so I won't be combing through some site. I am going to go ahead and close the topic as the vast majority of the time scraping data is against some sort of terms of use.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1