Website API

This package contains mostly scraping tools for well known websites like Two Plus Two forum, Pocketsfives, etc…

Two Plus Two Forum API

poker.website.twoplustwo.FORUM_URL

http://forumserver.twoplustwo.com

poker.website.twoplustwo.FORUM_MEMBER_URL

http://forumserver.twoplustwo.com/members

class poker.website.twoplustwo.ForumMember(username)[source]

Download and store a member data from the Two Plus Two forum.

Parameters:

id (int,str) –

Forum id (last part of members URL, e.g. in case of
the id is 407153)

Variables:
  • id (str) – Forum id
  • username (str) – Forum username
  • rank (str) – Forum rank like 'enthusiast'
  • profile_picture (str,None) – URL of profile if set.
  • location (str) – Location (country)
  • total_posts (int) – Total posts
  • posts_per_day (float) – Posts per day on account page
  • last_activity (datetime) – Last activity with the website timezone
  • join_date (date) – Join date on account page
  • public_usergroups (tuple) – Public usergroup permission as in the box on the top right
  • donwload_date (datetime) – When were the data downloaded from TwoplusTwo

Pocketfives API

class poker.website.pocketfives._Player(name, country, triple_crowns, monthly_win, biggest_cash, plb_score, biggest_score, average_score, previous_rank)[source]

Pocketfives player data.

Variables:
  • name (str) – Player name
  • country (str) – Country name
  • triple_crowns (int) – Number of triple crowns won
  • monthly_win (int) –
  • biggest_cash (str) –
  • plb_score (float) –
  • biggest_score (float) – Biggest Pocketfives score
  • average_score (float) – Average pocketfives score
  • previous_rank (str) – Previous pocketfives rank
poker.website.pocketfives.get_ranked_players()[source]

Get the list of the first 100 ranked players.

Returns:generator of _Players

Note

Downloading this list is a slow operation!

PokerStars website API

poker.website.pokerstars.WEBSITE_URL

http://www.pokerstars.eu

poker.website.pokerstars.TOURNAMENTS_XML_URL

http://www.pokerstars.eu/datafeed_global/tournaments/all.xml

poker.website.pokerstars.STATUS_URL

http://www.psimg.com/datafeed/dyn_banners/summary.json.js

poker.website.pokerstars.get_current_tournaments()[source]

Get the next 200 tournaments from pokerstars.

Returns:generator of _Tournament

Note

Downloading this list is an extremly slow operation!

poker.website.pokerstars.get_status()[source]

Get pokerstars status: players online, number of tables, etc.

Returns:_Status
class poker.website.pokerstars._Tournament(start_date, name, game, buyin, players)[source]

Upcoming pokerstars tournament.

Variables:
  • start_date (datetime) –
  • name (str) – Tournament name as seen in PokerStars Lobby
  • game (str) – Game Type
  • buyin (str) – Buy in with fee
  • players (int) – Number of players already registered
class poker.website.pokerstars._Status(updated, tables, next_update, players, clubs, active_tournaments, total_tournaments, sites, club_members)[source]

PokerStars status.

Variables:
  • updated (datetime) – Status last updated
  • tables (int) – Number of tournament tables
  • players (int) – Number of players logged in to PokerStars
  • clubs (int) – Total number of Home Game clubs created
  • club_members (int) – Total number of Home Game club members
  • active_tournaments (int) –
  • total_tournaments (int) –
  • sites (tuple) – Tuple of _SiteStatus
class poker.website.pokerstars._SiteStatus(id, tables, players, active_tournaments)[source]

PokerStars status on different subsites like FR, ES IT or Play Money.

Variables:
  • id (str) – ID of the site (".IT", ".FR", "Play Money")
  • tables (int) –
  • player (int) –
  • active_tournaments (int) –