あなたはこのようなrvest
としてHTMLスクレーパー/パーサが必要になります。
library(rvest)
url <- 'http://www.jabong.com/playdate-Off-White-Casual-Top-1342500.html?pos=1'
# get HTML, select list node with the information
page <- url %>% read_html() %>% html_node('.prod-main-wrapper')
# select the nodes within the list of each type, and get the text inside
variable <- page %>% html_nodes('label') %>% html_text()
value <- page %>% html_nodes('span') %>% html_text()
# put the text in a nice data.frame
data.frame(variable, value)
# variable value
# 1 Type Casual Tops
# 2 Fabric Cotton
# 3 Sleeves Half Sleeves
# 4 Neck Round neck
# 5 Fit Regular
# 6 Wash Care Hand Wash, Use Mild Detergents, Remove Belts/Broaches Before Wash
# 7 Color Off White
# 8 Fabric Details 95/5 Cotton Lycra
# 9 Style Graphic
# 10 SKU PL527KA99JYQINDFAS
# 11 Authorization Playdate authorized online sales partner. View Certificate
[rvest](https://github.com/hadley/rvest)などのウェブスクレイピングパッケージが必要です。 – alistaire
@alistaire:あなたは正しい質問を得られませんでした。私は完全なHTMLコードを手に入れました...私は特定の情報だけを抽出する必要があります。そうすれば、Stringrパッケージが助けになると思います。しかし、私はそれを抽出できるコードが必要です特定の情報..thanks –
'rvest'は擦れる可能性がありますが、擦り傷のほとんどはあなたがしなければならないものです。正規表現でHTMLを解析しないでください。それは悪い考えです。 – alistaire