R로 배우는 웹 스크레이핑
Timo Grossenbacher
Instructor
h1 {
color: red;
}
p {
font-style: italic;
}
<html>
<body>
<h1>웹 스크레이핑에 오신 것을 환영합니다!</h1>
<p>R, Python, 그 밖의 어떤
언어로 하든 -
스크레이핑은 재미있습니다!</p>
</body>
</html>
h1 {
color: green;
}
p {
font-style: italic;
}
h1, p {
font-family: sans-serif;
}
...
<h1>또 다른 CSS 예시.</h1>
<p>일부 텍스트.</p>
...

html %>% html_elements('h1, p')
{xml_nodeset (2)}
[1] <h1> Another CSS ex...
[2] <p>Some text</p>
type { key: value; }html %>% html_elements('type') # 예: 'h1', 'a', 'span'
type1, type2 { key: value; }html %>% html_elements('type1, type2')
* { key: value; }html %>% html_elements('*')
R로 배우는 웹 스크레이핑