Skip to content

Instantly share code, notes, and snippets.

@csinchok
csinchok / app.py
Last active December 15, 2015 10:29
Trying to find the "unique" tweets for a URL.
import requests
import sys
import pprint
import re
from difflib import SequenceMatcher
from requests_oauthlib import OAuth1
def clean_tweet(text):
return " ".join(re.sub(r"http://t.co/\w+", "", text).split())
@csinchok
csinchok / million_homepage_stats.py
Created November 12, 2012 21:51
Stats for the Million Dollar Homepage links
import requests
from bs4 import BeautifulSoup
homepage = requests.get('http://www.milliondollarhomepage.com')
soup = BeautifulSoup(homepage.content)
response_codes = {'error': 0}
urls = {}
for area in soup.find_all('area'):