Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/HTTP/R/http-1.r
Normal file
10
Task/HTTP/R/http-1.r
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
library(RCurl)
|
||||
webpage <- getURL("http://rosettacode.org")
|
||||
|
||||
#If you are linking to a page that no longer exists and need to follow the redirect, use followlocation=TRUE
|
||||
webpage <- getURL("http://www.rosettacode.org", .opts=list(followlocation=TRUE))
|
||||
|
||||
#If you are behind a proxy server, you will need to use something like:
|
||||
webpage <- getURL("http://rosettacode.org",
|
||||
.opts=list(proxy="123.123.123.123", proxyusername="domain\\username", proxypassword="mypassword", proxyport=8080))
|
||||
#Don't forget that backslashes in your username or password need to be escaped!
|
||||
3
Task/HTTP/R/http-2.r
Normal file
3
Task/HTTP/R/http-2.r
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
library(XML)
|
||||
pagetree <- htmlTreeParse(webpage )
|
||||
pagetree$children$html
|
||||
Loading…
Add table
Add a link
Reference in a new issue