1 # -*- coding: utf-8 -*-
4 from BeautifulSoup
import BeautifulSoup
10 print _("You need to manually enter the playername")
13 page
= urllib2
.urlopen("http://www.pocketfives.com/poker-scores/%s/" %playername
)
14 soup
= BeautifulSoup(page
)
18 for table
in soup
.findAll('table'):
19 # print "Found %s" % table
20 for row
in table
.findAll('tr'):
22 for col
in row
.findAll('td'):
23 tmp
= tmp
+ [col
.string
]
25 if len(tmp
) > 3 and tmp
[2] <> None:
26 results
= results
+ [tmp
]
28 cols
= ['TOURNAMENT', 'SITE', 'DATE', 'PRIZEPOOL', 'BUY-IN', 'PLACE', 'WON']
30 pp
= pprint
.PrettyPrinter(indent
=4)
32 for result
in results
:
33 print "Site: %s Date: %s\tPrizepool: %s\tBuyin: %s\tPosition: %s\tWon: %s" %(result
[2], result
[3], result
[4], result
[5], result
[6], result
[7])