How to clear table-like data from the stack home page? (in R)

I want to clear the homepage of one of the new stackexchange websites: https://webapps.stackexchange.com/ (only once and for just a few pages, nothing that should bother the servers). If I wanted this from stackoverflow, I know there is a database dump, but for the new stackexchange they do not exist yet.

Here is what I want to do.

Step 1: Choose URL

URL <- "https://webapps.stackexchange.com/"

Step 2: read the table

readHTMLTable(URL)  # oops, doesn't work - gives NULL

Step 2: try it with XML this time

htmlTreeParse(URL) # o.k, this reads the data - but it is all in <div> - now what?

So, I was able to read the page, but now the structure is in a div. How can it be used now to create the same as readHTMLTable?

+3
source share
2

overflowr ( API StackExchange). get.questions() . CRAN, , .

library(overflowr)
questions <- get.questions(50)

, 5 :

questions <- get.questions(top.n=5, site="stats.stackexchange")

, , , , . Stats.Exchange.

+8

? , - (). .

0

Source: https://habr.com/ru/post/1760782/


All Articles