<jupyter_start><jupyter_text>Nasa Mars News<jupyter_code>url = "https://mars.nasa.gov/news/"
browser.visit(url)
html = browser.html
soup = BeautifulSoup(html, 'lxml')
news_title = soup.find("div", class_="content_title").text
news_p = soup.find("div", class_="article_teaser_body").text<jupyter_output><empty_output><jupyter_text>JPL Mars Space Images - Featured Image<jupyter_code>url = "https://www.jpl.nasa.gov"
url2 = "/spaceimages/?search=&category=Mars"
browser.visit(url+url2)
html = browser.html
soup = BeautifulSoup(html, 'lxml')
featured_image_url = url + soup.find("a", class_="button fancybox")["data-fancybox-href"]<jupyter_output><empty_output><jupyter_text>Mars Weather<jupyter_code>url = "https://twitter.com/marswxreport?lang=en"
browser.visit(url)
html = browser.html
soup = BeautifulSoup(html, 'lxml')
mars_weather = soup.find("p", class_="TweetTextSize TweetTextSize--normal js-tweet-text tweet-text").text<jupyter_output><empty_output><jupyter_text>Mars Facts<jupyter_code>url = "https://space-facts.com/mars/"
browser.visit(url)
tables = pd.read_html(url)
mars_df = tables[1].set_index(0).rename(columns={1:"Facts"})
mars_df.index = mars_df.index.rename("")
mars_html = mars_df.to_html()<jupyter_output><empty_output><jupyter_text>Mars Hemispheres<jupyter_code>url = "https://astrogeology.usgs.gov"
url2 = "/search/results?q=hemisphere+enhanced&k1=target&v1=Mars"
browser.visit(url+url2)
html = browser.html
soup = BeautifulSoup(html, 'lxml')
divs = soup.find_all("div",class_="description")
links = [x.a["href"] for x in divs]
images = []
for x in links:
    response = requests.get(url+str(x))
    soup2 = BeautifulSoup(response.text, 'lxml')
    images.append(url+str(soup2.find("img",class_="wide-image")["src"]))
hemisphere_image_urls = [
    {"title": "Cerberus Hemisphere", "img_url": images[0]},
    {"title": "Schiaparelli Hemisphere", "img_url": images[1]},
    {"title": "Syrtis Major Hemisphere", "img_url": images[2]},
    {"title": "Valles Marineris Hemisphere", "img_url": images[3]},
]
print(mars_html)<jupyter_output><table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>Facts</th>
    </tr>
    <tr>
      <th>0</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>Equatorial Diameter:</th>
      <td>6,792 km</td>
    </tr>
    <tr>
      <th>Polar Diameter:</th>
      <td>6,752 km</td>
    </tr>
    <tr>
      <th>Mass:</th>
      <td>6.39 × 10^23 kg (0.11 Earths)</td>
    </tr>
    <tr>
      <th>Moons:</th>
      <td>2 (Phobos &amp; Deimos)</td>
    </tr>
    <tr>
      <th>Orbit Distance:</th>
      <td>227,943,824 km (1.38 AU)</td>
    </tr>
    <tr>
      <th>Orbit Period:</th>
      <td>687 days (1.9 years)</td>
    </tr>
    <tr>
      <th>Surface Temperature:</th>
      <td>-87 to -5 °C</td>
    </tr>
    <tr>
      <th>First Record:</th>
      <td>2nd millennium BC</td>
    </tr>
    <tr>
      <th>Recorded By:</th>
      <td>Egyptian astronomers</td>
    </tr>
  </tbody>
</table>
{'fraction_non_alphanumeric': 0.19390122638382498, 'fraction_numerical': 0.0188929400066291, 'mean_word_length': 4.072268907563025, 'pattern_counts': {'":': 8, '<': 92, '<?xml version=': 0, '>': 92, 'https://': 5, 'lorem ipsum': 0, 'www.': 1, 'xml': 5}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '50386', 'license': 'ADSL', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1223, 'n_words': 195, 'path': 'Mission to Mars/mission_to_mars.ipynb', 'repo_name': 'gyros33/web-scraping-challenge', 'size': '3017'}