Skip to content

Instantly share code, notes, and snippets.

View whiteclover's full-sized avatar
:octocat:
On vacation

White Clover whiteclover

:octocat:
On vacation
View GitHub Profile
@whiteclover
whiteclover / rss_mysql.py
Created July 1, 2013 00:07
MySQLdb and threading Base Usage rss parser
import threading
import feedparser
import urllib2
import hashlib
import time
import MySQLdb
@whiteclover
whiteclover / form_controls.py
Created July 1, 2013 00:06
get form from web page
import mechanize
import sys
br = mechanize.Browser()
response = br.open(sys.argv[1])
for form in br.forms():
print "name:[%r] id:[%r] action:[%s]" %(form.name, form.attrs.get('id'), form.action)
print "Controls: "
for control in form.controls:
print ' ', control.type, control.name, repr(control.value)