Extracting data from a web

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Extracting data from a web

Pedro páramo
I want to folow a fund and I see I can obtain data from here but I have to
Mark the dates on the web previously, there is no a txt ir CSV, is there a
way to extract the values from a line in a .R on a web like this?


<a href="https://www.bankiafondos.es/es/fondos/bankia-banca-privada-selccion-fi##it-tab-4">https://www.bankiafondos.es/es/fondos/bankia-banca-privada-selccion-fi##it-tab-4

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Extracting data from a web

Mario-2
It’s a nice small project for web scraping.

Mario

> El 30 jul 2020, a las 18:01, Pedro páramo <[hidden email]> escribió:
>
> I want to folow a fund and I see I can obtain data from here but I have to
> Mark the dates on the web previously, there is no a txt ir CSV, is there a
> way to extract the values from a line in a .R on a web like this?
>
>
> <a href="https://www.bankiafondos.es/es/fondos/bankia-banca-privada-selccion-fi##it-tab-4">https://www.bankiafondos.es/es/fondos/bankia-banca-privada-selccion-fi##it-tab-4
>
>    [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Extracting data from a web

Chirag Anand
In reply to this post by Pedro páramo
On Thu, 30 Jul 2020 at 21:31, Pedro páramo <[hidden email]> wrote:

> I want to folow a fund and I see I can obtain data from here but I have to
> Mark the dates on the web previously, there is no a txt ir CSV, is there a
> way to extract the values from a line in a .R on a web like this?
>

Try using XML::htmlTreeParse(). The line data seems to be coded very nicely
in a `<ul`>` and a few `<li>` with a tagged `class`.

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.