Anonymous user
HTTP: Difference between revisions
m
Removed comments, updated whitespace, URL.
m (Updated URL.) |
m (Removed comments, updated whitespace, URL.) |
||
Line 1,609:
{{libheader|RCurl}}
{{libheader|XML}}
First, retrieve the webpage.
<lang R>library(RCurl)▼
▲library(RCurl)
webpage <- getURL("http://www.w3.org/Home.html", .opts=list(proxy="123.123.123.123", proxyusername="domain\\username", proxypassword="mypassword", proxyport=8080))</lang>▼
▲webpage <- getURL("http://rosettacode.org")
▲webpage <- getURL("http://www.rosettacode.org", .opts=list(followlocation=TRUE))
▲ .opts=list(proxy="123.123.123.123", proxyusername="domain\\username", proxypassword="mypassword", proxyport=8080))
Now parse the html code into a tree and print the html.
<lang R>library(XML)▼
pagetree$children$html</lang>▼
▲library(XML)
▲pagetree <- htmlTreeParse(webpage )
▲pagetree$children$html
=={{header|Racket}}==
|