docs: def get_ladder_matches(session, ladder_id, from_timestamp=None, limit=LADDER_MATCH_LIMIT):
      """Get recently played ladder matches."""
      if not from_timestamp:
          from_timestamp = datetime.datetime.now() - datetime.timedelta(days=1)
      matches = []
      page_id = 0
      done = False
      i = 0
      while not done and page_id < MAX_LADDER_PAGE_ID:
          url = '{}{}/{}/{}'.format(session.auth.base_url, LADDER_MATCHES_URL, lookup_ladder_id(ladder_id), page_id)
          parsed = make_scrape_request(session, url)
          for row in parsed.find(text='Recent Matches').find_next('table').find_all('tr')[1:]:
              cols = row.find_all('td')
              played_at = dateparser.parse(cols[0].text)
              match_id = int(cols[1].find('a').text[1:])
              has_rec = cols[4].find('a').find('img')
              if not has_rec:
                  continue
              if played_at < from_timestamp or i >= limit:
                  done = True
                  break
              matches.append({
                  'timestamp': played_at,
                  'match_id': match_id
              })
              i += 1
          page_id += 1
      return matches