Unable to take correct Web-snapshot

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

Unable to take correct Web-snapshot

Bogaso
Hi again,

I use the *webshot* package to take snapshot from Webpage. However, when I
try to take snapshot from* https://www.coinbase.com/
<https://www.coinbase.com/>*, this fails to take the full snapshot of that
page.

I tried following :

> library(webshot)
> webshot("https://www.coinbase.com/", 'aa.pdf')

However in the pdf page, I done see the quotes which are available on the
main page in the 4 boxes.

Any help how to resolve this would be highly appreciated.

Thanks,

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to take correct Web-snapshot

Martin Møller Skarbiniks Pedersen
On 1 June 2018 at 15:08, Christofer Bogaso <[hidden email]> wrote:
> Hi again,
>
> I use the *webshot* package to take snapshot from Webpage. However, when I
> try to take snapshot from* https://www.coinbase.com/
> <https://www.coinbase.com/>*, this fails to take the full snapshot of that
> page.

Yes, that is a general problem with many webshot programs and libraries.

The coinbase page ( and many others ) uses a lot of javascript to generate their
pages and the webshot programs must understand javascript in all
details which is hard.

If you are looking for the coinbase prices you can use their api to
get json instead:

https://api.coinbase.com/v2/prices/spot?currency=USD

Regards
Martin

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to take correct Web-snapshot

Bogaso
Thanks for that information.

However how can I use R to directly get data from that API?

On Fri, Jun 1, 2018 at 8:36 PM Martin Møller Skarbiniks Pedersen <
[hidden email]> wrote:

> On 1 June 2018 at 15:08, Christofer Bogaso <[hidden email]>
> wrote:
> > Hi again,
> >
> > I use the *webshot* package to take snapshot from Webpage. However, when
> I
> > try to take snapshot from* https://www.coinbase.com/
> > <https://www.coinbase.com/>*, this fails to take the full snapshot of
> that
> > page.
>
> Yes, that is a general problem with many webshot programs and libraries.
>
> The coinbase page ( and many others ) uses a lot of javascript to generate
> their
> pages and the webshot programs must understand javascript in all
> details which is hard.
>
> If you are looking for the coinbase prices you can use their api to
> get json instead:
>
> https://api.coinbase.com/v2/prices/spot?currency=USD
>
> Regards
> Martin
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to take correct Web-snapshot

Ista Zahn
The documentation is at https://developers.coinbase.com/api/v2. You
can make GET requests in R using the httr packge.

--Ista

On Fri, Jun 1, 2018 at 11:12 AM, Christofer Bogaso
<[hidden email]> wrote:

> Thanks for that information.
>
> However how can I use R to directly get data from that API?
>
> On Fri, Jun 1, 2018 at 8:36 PM Martin Møller Skarbiniks Pedersen <
> [hidden email]> wrote:
>
>> On 1 June 2018 at 15:08, Christofer Bogaso <[hidden email]>
>> wrote:
>> > Hi again,
>> >
>> > I use the *webshot* package to take snapshot from Webpage. However, when
>> I
>> > try to take snapshot from* https://www.coinbase.com/
>> > <https://www.coinbase.com/>*, this fails to take the full snapshot of
>> that
>> > page.
>>
>> Yes, that is a general problem with many webshot programs and libraries.
>>
>> The coinbase page ( and many others ) uses a lot of javascript to generate
>> their
>> pages and the webshot programs must understand javascript in all
>> details which is hard.
>>
>> If you are looking for the coinbase prices you can use their api to
>> get json instead:
>>
>> https://api.coinbase.com/v2/prices/spot?currency=USD
>>
>> Regards
>> Martin
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.