rvest HTML web scraping - "objects" ; referenced same as dataframes? Export to MariaDB? Anyone with success?

Hello R Studio Data Scientists,

I have a script that I posted the other day. I can run the script on any court opinion on justia dot com and it will pull the values in R Studio no problem. I haven't created a data frame.

I just would like to pass the collected data; which is in 21 different p_nodes[1:21] which gathered the data I needed using Xpath and rvest package.

The following variable names that have picked up the data I need to learn how to pass to a MariaDB local database. (I can connect to the database; query the server; see what table is there; and see if tables exist with TRUE or FALSE) -- all working.

I was even able to get an almost working line which was the following:

"dbWriteTable(con, "F.2d", p_text[1], append = TRUE);"

interesting enough... I get this error:

dbWriteTable(con, "F.2d", export_1, append = TRUE);
Error in normalizePath(value, winslash = "/", mustWork = TRUE) :
path[1]="1 F.2d 935 (1924)": No such file or directory

I am running Debian Linux 9 Stretch. I checked the working directory; which is /home/brandon ; same as the user logged into R-Studio.

Variables Names Grabbed when entering a justia URL court opinion into the script I posted on my last thread.

p_text[1] = extracted_op_case_cite
p_text[2] = extracted_op_case_parties
p_text[3] = extracted_op_case_number
p_text[4] = extracted_op_case_juris
p_text[5] = extracted_op_case_date
p_text[6] = extracted_plaintiff_attorneys
p_text[7] = extracted_pinpoints
p_text[8] = extracted_defense_attorneys
p_text[9] = extracted_defense2_attorneys
p_text[10] = extracted_judge
p_text[11] = extracted_opinion_p1
p_text[12] = extracted_opinion_p2
p_text[13] = extracted_opinion_p3
p_text[14] = extracted_opinion_p4
p_text[15] = extracted_opinion_p5
p_text[16] = extracted_opinion_p6
p_text[17] = extracted_opinion_p7
p_text[18] = extracted_opinion_p8
p_text[19] = extracted_opinion_p9
p_text[20] = extracted_opinion_p10
p_text[21] = extracted_title

What I would like to do is take p_text[1] - p_text[21] or the stored variables from the scraped justia court opinion.

Then pass these into a table "F.2d" onto a row with all the p_text 1 - p_text 21 as the columns and have it so it allows appending; row after row; from URL scrape to URL scrape).

Trying to populate a database using this script that did work to get the data targeted.

Any help would be greatly appreciated! Thank you and God speed!

The script that I am scraping with I posted on


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.