Skip to content

Instantly share code, notes, and snippets.

require(RCurl)
require(rjson)
require(XML)
url = 'http://cn.soccerway.com/a/block_competition_matches?block_id=page_competition_1_block_competition_matches_7&callback_params=%7B%22page%22%3A%22-1%22%2C%22round_id%22%3A%2217950%22%2C%22outgroup%22%3A%22%22%2C%22view%22%3A%222%22%7D&action=changePage&params=%7B%22page%22%3A0%7D'
doc = getURL(url)
txt = fromJSON(doc)$commands[[1]]$parameters$content
tab = readHTMLTable(htmlParse(txt, encoding = 'utf-8'))[[1]]
@ryusukekenji
ryusukekenji / facebook_mining.r
Created January 28, 2012 06:10 — forked from simecek/facebook_mining.r
Facebook Mining
# go to 'https://developers.facebook.com/tools/explorer' to get your access token
access_token <- "******************* INPUT YOUR ACCESS TOKEN ******************************"
require(RCurl)
require(rjson)
# Facebook json function copied from original (Romain Francois) post
facebook <- function( path = "me", access_token, options){
if( !missing(options) ){
options <- sprintf( "?%s", paste( names(options), "=", unlist(options), collapse = "&", sep = "" ) )