Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PokerStars ClubHouse Games #42

Open
mousey opened this issue May 25, 2020 · 0 comments
Open

PokerStars ClubHouse Games #42

mousey opened this issue May 25, 2020 · 0 comments

Comments

@mousey
Copy link

mousey commented May 25, 2020

I've been trying to parse some ClubHouse games to keep track of how a bunch of friends are doing (PokerStars statistics don't seem to be loading).

A club House game seems to have a slightly different format to the other game types I've seen.

PokerStars Home Game Hand #214296101572: {Club #32872232} Tournament #2905961235, $5.00+$1.25+$0.50 USD Hold'em No Limit - Level III (25/50) - 2020/05/22 21:56:50 WET [2020/05/22 16:56:50 ET] Table '2905961235 1' 9-max Seat #7 is the button

So I've amended the REGEX so accept the new pieces of information (Home Game, {Club #3940394}, factoring in the original timezone date, and a 3rd +$1.50 in the prize values (due to playing a knockout variant)

` _header_re = re.compile( r"""

                    ^PokerStars.+?\s+                             # Poker Room
                    Hand\s+\#(?P<ident>\d+):\s+                   # Hand history id
                    (\{Club\s+\#(?P<club_ident>\d+)\}\s+)?        # Club id
                    (Tournament\s+\#(?P<tournament_ident>\d+),\s+ # Tournament Number
                     ((?P<freeroll>Freeroll)|(                    # buyin is Freeroll
                      \$?(?P<buyin>\d+(\.\d+)?)                   # or buyin
                      (\+\$?(?P<knockrake>\d+(\.\d+)?))?          # knockout or rake value depends on how you're playing
                      (\+\$?(?P<rake>\d+(\.\d+)?))?               # and rake if this is a knockout game
                      (\s+(?P<currency>[A-Z]+))?                  # and currency
                     ))\s+
                    )?
                    (?P<game>.+?)\s+                              # game
                    (?P<limit>(?:Pot\s+|No\s+|)Limit)\s+          # limit
                    (-\s+Level\s+(?P<tournament_level>\S+)\s+)?   # Level (optional)
                    \(
                     (((?P<sb>\d+)/(?P<bb>\d+))|(                 # tournament blinds
                      \$(?P<cash_sb>\d+(\.\d+)?)/                 # cash small blind
                      \$(?P<cash_bb>\d+(\.\d+)?)                  # cash big blind
                      (\s+(?P<cash_currency>\S+))?                # cash currency
                     ))
                    \)\s+
                    -\s+.+?\s+                                    # localized date
                    \[(?P<date>.+?)\]                             # ET date
                    """,
    re.VERBOSE,
)`

This got rid of the error I was getting due to match(ident), but now I'm being told that the game type is incorrect but it's evaluating:

"[CLUB #3287223] TOURNAMENT #2905961235, $5.00+$1.25+$0.50 USD HOLD'EM"

rather than just the HOLD'EM piece.

@pokerregion pokerregion deleted a comment from valiumDejavu Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant