input: Write a function to scrape the table from the given URL and extract the planet information (name, mass, and distance from the sun). The function should return a list of dictionaries, where each dictionary contains the extracted information for a planet. If the table is empty, the function should return an empty list.
  assert crawl_planets_info('https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System')==[{'name': 'Mercury', 'mass': '0.0553', 'distance_from_sun': '0.4'}, {'name': 'Venus', 'mass': '0.815', 'distance_from_sun': '0.7'}, {'name': 'Earth', 'mass': '1', 'distance_from_sun': '1.0'}, {'name': 'Mars', 'mass': '0.107', 'distance_from_sun': '1.5'}, {'name': 'Jupiter', 'mass': '318', 'distance_from_sun': '5.2'}, {'name': 'Saturn', 'mass': '95', 'distance_from_sun': '9.5'}, {'name': 'Uranus', 'mass': '14', 'distance_from_sun': '19.2'}, {'name': 'Neptune', 'mass': '17', 'distance_from_sun': '30.1'}]
  assert crawl_planets_info('https://nonexistenturl.com')==[]
  assert crawl_planets_info('')==[]
output: import requests
  from bs4 import BeautifulSoup
  
  def crawl_planets_info(url):
      try:
          response = requests.get(url)
          response.raise_for_status()
          soup = BeautifulSoup(response.text, 'html.parser')
          table = soup.find('table')
          if not table:
              return []
          rows = table.find_all('tr')
          planets_info = []
          for row in rows[1:]:
              cols = row.find_all('td')
              if len(cols) >= 3:
                  name = cols[0].get_text(strip=True)
                  mass = cols[1].get_text(strip=True)
                  distance_from_sun = cols[2].get_text(strip=True)
                  planets_info.append({'name': name, 'mass': mass, 'distance_from_sun': distance_from_sun})
          return planets_info
      except:
          return []