input: Write a python function to extract and print the club names and seasons from the infobox of a given Wikipedia page about a rugby player.
  assert extract_clubs_and_seasons("Mathieu Bourret") == (["Club1", "Club2", "Club3"], ["Season1", "Season2", "Season3"])
  assert extract_clubs_and_seasons("Player2") == (["ClubA", "ClubB"], ["SeasonX", "SeasonY"])
  assert extract_clubs_and_seasons("Player3") == (["ClubX", "ClubY", "ClubZ"], ["SeasonA", "SeasonB", "SeasonC"])
output: def extract_clubs_and_seasons(player_name):
      import requests
      from bs4 import BeautifulSoup
  
      def get_wikipedia_infobox(player_name):
          url = f"https://en.wikipedia.org/wiki/{player_name.replace(' ', '_')}"
          response = requests.get(url)
          soup = BeautifulSoup(response.content, 'html.parser')
          infobox = soup.find('table', {'class': 'infobox vcard'})
          return infobox
  
      def parse_clubs_and_seasons(infobox):
          clubs = []
          seasons = []
          if infobox:
              rows = infobox.find_all('tr')
              for row in rows:
                  header = row.find('th')
                  if header and 'Club' in header.text:
                      clubs.append(row.find('td').text.strip())
                  if header and 'Season' in header.text:
                      seasons.append(row.find('td').text.strip())
          return clubs, seasons
  
      infobox = get_wikipedia_infobox(player_name)
      clubs, seasons = parse_clubs_and_seasons(infobox)
      return clubs, seasons