imports still running tournaments, except for TourneysPlayers
This commit is contained in:
parent
6a3587e92e
commit
ae2c32f902
|
@ -40,6 +40,7 @@ class PokerStarsSummary(TourneySummary):
|
||||||
lines=self.summaryText.splitlines()
|
lines=self.summaryText.splitlines()
|
||||||
|
|
||||||
self.tourNo = self.re_TourNo.findall(lines[0])[0][1:-1] #ignore game and limit type as thats not recorded
|
self.tourNo = self.re_TourNo.findall(lines[0])[0][1:-1] #ignore game and limit type as thats not recorded
|
||||||
|
print "tourNo:",self.tourNo
|
||||||
|
|
||||||
if lines[1].find("$")!=-1: #TODO: move this into a method and call that from PokerStarsToFpdb.py:269 if hand.buyinCurrency=="USD" etc.
|
if lines[1].find("$")!=-1: #TODO: move this into a method and call that from PokerStarsToFpdb.py:269 if hand.buyinCurrency=="USD" etc.
|
||||||
self.currency="USD"
|
self.currency="USD"
|
||||||
|
@ -65,20 +66,23 @@ class PokerStarsSummary(TourneySummary):
|
||||||
self.entries = self.re_Entries.findall(lines[currentLine])[0]
|
self.entries = self.re_Entries.findall(lines[currentLine])[0]
|
||||||
currentLine+=1 #note that I chose to make the code keep state (the current line number)
|
currentLine+=1 #note that I chose to make the code keep state (the current line number)
|
||||||
#as that means it'll fail rather than silently skip potentially valuable information
|
#as that means it'll fail rather than silently skip potentially valuable information
|
||||||
#print "after entries lines[currentLine]", lines[currentLine]
|
print "after entries lines[currentLine]", lines[currentLine]
|
||||||
|
|
||||||
result=self.re_Added.search(lines[currentLine])
|
result=self.re_Added.search(lines[currentLine])
|
||||||
if result:
|
if result:
|
||||||
print "detected addon [currentLine]", lines[currentLine]
|
|
||||||
result=result.groupdict()
|
result=result.groupdict()
|
||||||
self.added=100*int(Decimal(result['DOLLAR']))+int(Decimal(result['CENT']))
|
self.added=100*int(Decimal(result['DOLLAR']))+int(Decimal(result['CENT']))
|
||||||
self.addedCurrency=result['CURRENCY']
|
self.addedCurrency=result['CURRENCY']
|
||||||
#print "TODO: implement added:",self.added,self.addedCurrency
|
#print "TODO: implement added:",self.added,self.addedCurrency
|
||||||
currentLine+=1
|
currentLine+=1
|
||||||
|
print "after added/entries lines[currentLine]", lines[currentLine]
|
||||||
|
|
||||||
self.prizepool = self.re_Prizepool.findall(lines[currentLine])[0]
|
result=self.re_Prizepool.findall(lines[currentLine])
|
||||||
self.prizepool = self.prizepool[1:-3]+self.prizepool[-2:]
|
if result:
|
||||||
currentLine+=1
|
print "prizepool result", result
|
||||||
|
self.prizepool = result[0]
|
||||||
|
self.prizepool = self.prizepool[1:-3]+self.prizepool[-2:]
|
||||||
|
currentLine+=1
|
||||||
#print "after prizepool lines[currentLine]", lines[currentLine]
|
#print "after prizepool lines[currentLine]", lines[currentLine]
|
||||||
|
|
||||||
result=self.re_DateTime.search(lines[currentLine])
|
result=self.re_DateTime.search(lines[currentLine])
|
||||||
|
@ -89,10 +93,12 @@ class PokerStarsSummary(TourneySummary):
|
||||||
currentLine+=1
|
currentLine+=1
|
||||||
|
|
||||||
result=self.re_DateTime.search(lines[currentLine])
|
result=self.re_DateTime.search(lines[currentLine])
|
||||||
result=result.groupdict()
|
if result:
|
||||||
datetimestr = "%s/%s/%s %s:%s:%s" % (result['Y'], result['M'],result['D'],result['H'],result['MIN'],result['S'])
|
print "endtime result", result
|
||||||
self.endTime= datetime.datetime.strptime(datetimestr, "%Y/%m/%d %H:%M:%S") # also timezone at end, e.g. " ET"
|
result=result.groupdict()
|
||||||
currentLine+=1
|
datetimestr = "%s/%s/%s %s:%s:%s" % (result['Y'], result['M'],result['D'],result['H'],result['MIN'],result['S'])
|
||||||
|
self.endTime= datetime.datetime.strptime(datetimestr, "%Y/%m/%d %H:%M:%S") # also timezone at end, e.g. " ET"
|
||||||
|
currentLine+=1
|
||||||
|
|
||||||
for i in range(currentLine,len(lines)-2): #lines with rank and winnings info
|
for i in range(currentLine,len(lines)-2): #lines with rank and winnings info
|
||||||
if lines[i].find(":")==-1:
|
if lines[i].find(":")==-1:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user