Is there any way or method to do this?

Asked

Viewed 80 times

0

I’m new to programming, I have a little experience with HTML (hence Javascript), and I need something like this:

Something that "read" an html file and get some information straight from the source.

For example:

<div class=exemplo>
    <ol>
      <li>ex1</li>
      <li>ex2</li>
      <li>ex3</li>
    </ol>
</div>

In an HTML and return what I want it to return.

It is possible to do this via JS?

From now on, thank you.

  • You can apply this phrase better: "Something that "reads" an html file and get some information straight from the source."? What do you mean by source? do you want to do this dynamically or do you want the user to choose the file? and you want a local or remote file?

  • I’m sorry, explain better also this phrase: "and return what I want it to return".

  • Remote, I think so. more or less like this, the program generates a page (like a random search on google), visits it (without the graphical part) and returns what is specified.

  • And does this remote site accept CORS? (requests from other domains). You cannot do this in PHP or Node.js (to be with Javascript but on the server side)?

  • As I want to do this with Youtube, which is from Google, probably yes. https://developers.google.com/api-client-library/javascript/features/cors

  • What specific information do you want to get from Youtube?

  • I want the video views found. http://i.imgur.com/S5ydfn9.png . Beyond href So in short, something that extracts href and views.

  • Search for crawlers or web Spiders.

  • @Diegomachado How do I choose your comment as an answer? I’m new here. Thanks for the tip! There are hundreds of web crawlers out there. Thank you very much.

  • Next to the comment has an up arrow. But you can also reply to this topic by quoting the comment and mark your reply as solved. Hugs!

  • @Diegomachado and Mateusmercer, to accept as an answer the correct comment is to write this comment as an answer so that it can be clicked on the accept option, the vote of the arrow upwards only indicates that the comment was good to clarify/solve the problem.

  • Okay, it’s written in response

Show 7 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.