-
Notifications
You must be signed in to change notification settings - Fork 0
/
muse_pixivdic.R
21 lines (18 loc) · 1.18 KB
/
muse_pixivdic.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
library(rvest)
library(dplyr)
#get data
Honoka <- html("http://dic.pixiv.net/a/高坂穂乃果") %>% html_nodes("span.ui-tooltip") %>% html_text()
Kotori <- html("http://dic.pixiv.net/a/南ことり") %>% html_nodes("span.ui-tooltip") %>% html_text()
Umi <- html("http://dic.pixiv.net/a/園田海未") %>% html_nodes("span.ui-tooltip") %>% html_text()
Maki <- html("http://dic.pixiv.net/a/西木野真姫") %>% html_nodes("span.ui-tooltip") %>% html_text()
Rin <- html("http://dic.pixiv.net/a/星空凛") %>% html_nodes("span.ui-tooltip") %>% html_text()
Hanayo <- html("http://dic.pixiv.net/a/小泉花陽") %>% html_nodes("span.ui-tooltip") %>% html_text()
Nico <- html("http://dic.pixiv.net/a/矢澤にこ") %>% html_nodes("span.ui-tooltip") %>% html_text()
Nozomi <- html("http://dic.pixiv.net/a/東條希") %>% html_nodes("span.ui-tooltip") %>% html_text()
Eri <- html("http://dic.pixiv.net/a/絢瀬絵里") %>% html_nodes("span.ui-tooltip") %>% html_text()
#make data frame
ch <- c("Honoka", "Kotori", "Umi", "Maki", "Rin", "Hanayo", "Nico", "Nozomi", "Eri")
vi <- c(Honoka, Kotori, Umi, Maki, Rin, Hanayo, Nico, Nozomi, Eri)
Muse <- data.frame(Chara=ch, View=vi)
#arrange
arrange(Muse, desc(View))