This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import sys | |
import os.path | |
import pprint | |
sys._old_excepthook = sys.excepthook | |
def assert_hook(exc_type, exception, traceback): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import cookielib | |
from urllib2 import HTTPCookieProcessor, build_opener | |
from urllib import urlencode | |
from BeautifulSoup import BeautifulSoup | |
# the login data | |
login_data = { | |
'login_username': u'USERNAME', | |
'login_password': u'PASSWORD', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib2 import urlopen | |
from BeautifulSoup import BeautifulSoup | |
data = urlopen('''http://www.hydro.eaufrance.fr/stations/O7502510&procedure=tousmois''').read() | |
soup = BeautifulSoup(data) | |
table = soup.find('table', {'summary': "valeurs mensuelles et annuelles"}) | |
for tr in table.findAll('tr'): | |
line = [] | |
for td in tr.findAll('td'): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Robot; | |
import java.awt.event.KeyEvent; | |
import java.awt.AWTException; | |
public class KeyPresser { | |
public static void main(String[] args) { | |
int delay = 0; | |
try { |
NewerOlder