Getting c++ exception trying to scrape javascript rendered web page with rvest and V8
NickName:memokerobi Ask DateTime:2021-03-12T03:48:07

Getting c++ exception trying to scrape javascript rendered web page with rvest and V8

I want to scrape a webpage that is javascript rendered so rvest alone doesn't do the work I want. I am familiar with RSelenium but I don't want to use it for this task since I want to scrape multiple pages and it takes time. I am not familiar with V8 but I used this page as a guide to come up with this code.

library(rvest)
library(V8)

ctx <- v8()

link <- "https://www.pff.com/nfl/players/Drew-Bledsoe/36"

link %>%
  read_html() %>% 
  html_nodes('script') %>% 
  html_text() %>%
  gsub('document.write','',.) %>%
  ctx$eval() %>%
  read_html() %>%
  html_text()

However this gives me an error:

Error in context_eval(join(src), private$context, serialize) : 
  c++ exception (unknown reason)

What I want to do is get the year value under draft year for some players. An example here would be 1993 in this page.

Copyright Notice:Content Author:「memokerobi」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/66589525/getting-c-exception-trying-to-scrape-javascript-rendered-web-page-with-rvest-a

More about “Getting c++ exception trying to scrape javascript rendered web page with rvest and V8” related questions

Getting Started in C

I know there are many tutorials out there for getting started in C. However Its hard for me to apply the knowledge. The way I've always started out in languages is by writing scripts. Of course C i...

Show Detail

Getting the handle of window in C#

I'm trying to do some P/Invoke stuff and need the handle of the current window. I found Getting the handle of window in C# But it appears that only works in WPF. Is there a winForms equivalent?

Show Detail

Getting errors - c programming

Getting these errors when I try and running this simple C program code in VB. need help rectifying them. C2371 'CopySubString': redefinition;different basic types Here is the code: // ------------...

Show Detail

Getting terminal size in c for windows?

How to check ymax and xmax in a console window, under Windows, using plain c? There is this piece of code for linux: #include &lt;stdio.h&gt; #include &lt;sys/ioctl.h&gt; int main (void) { st...

Show Detail

Getting token with Quickblox in C#

I'm trying to access my QuickBlox app and getting a token using the REST API. My code looks like this: http://pastebin.com/rp2KLMp2 The request looks like this (sensitive info removed): applicati...

Show Detail

Getting string with C function

I need to get strings dynamically but as I need to get more than one string, I need to use functions. So far I wrote this (I put //**** at places i think might be wrong) char* getstring(char *str)...

Show Detail

Getting started for C# AspNet Core and Heroku

There are a number of "getting started" pages for Heroku in a number of languages. As far as I have been able to determine C# is not on the list. Where do I go for "getting started" with ASP.NET Co...

Show Detail

gcc: error: getting-started.c: No such file or directory

I'm very first at learning C and my gcc can't find the files this is the file &quot;getting-started.c&quot; #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; int main(void) { double A[5] = {&

Show Detail

Getting C# dlls Process Modules

I have a managed .NET application. I am attempting to get all the process modules that are loaded by a current process so I can figure out what the Base address of these modules are. However when I...

Show Detail

C# not getting data from Ajax

I have a problem sending ajax data from my javascript file to my c# controller. I get a "bad request error" in my c# program, and the reason i get that is because the data parameter "result" which ...

Show Detail