Skip to content

Instantly share code, notes, and snippets.

@zhitaoyin
zhitaoyin / delete_all_tweets.py
Created June 2, 2016 05:21 — forked from davej/delete_all_tweets.py
This script will delete all of the tweets in a specified account.
# -*- coding: utf-8 -*-
"""
This script will delete all of the tweets in the specified account.
You may need to hit the "more" button on the bottom of your twitter profile
page every now and then as the script runs, this is due to a bug in twitter.
You will need to get a consumer key and consumer secret token to use this
script, you can do so by registering a twitter application at https://dev.twitter.com/apps
@requirements: Python 2.5+, Tweepy (http://pypi.python.org/pypi/tweepy/1.7.1)
## Load libraries
library(XML)
library(dplyr)
library(RCurl)
## Get the results for a specific term
scrape_term = function(search_term,npages){
base_url = "http://scholar.google.com/scholar?"
search_string = paste0("q=",paste0(strsplit(search_term," ")[[1]],collapse="+"))
dat = data.frame(NA,nrow=10*npages,ncol=3)