<jupyter_start><jupyter_text>Mars Weather Twitter Section Below<jupyter_code>#now to process the Mars weather:
weather_url = 'https://twitter.com/marswxreport?lang=en'
browser.visit(weather_url)
html_weather = browser.html
soup_weather = BeautifulSoup(html_weather, 'html.parser')
weather_p = soup_weather.find_all('p', class_="TweetTextSize TweetTextSize--normal js-tweet-text tweet-text")
mars_weather = weather_p[0].text
print(mars_weather)<jupyter_output>Sol 2224 (2018-11-08), high 0C/32F, low -72C/-97F, pressure at 8.65 hPa, daylight 06:19-18:36<jupyter_text>Mars facts section below (get the table)<jupyter_code>facts_url = 'http://space-facts.com/mars'
mars_table = pd.read_html(facts_url, flavor = 'html5lib')
mars_table
mars_df = mars_table[0]
mars_df.columns = ['Description', 'Value']
mars_df
mars_html = mars_df.to_html(index=False)
mars_html<jupyter_output><empty_output><jupyter_text>Mars Hemispheres section below<jupyter_code>hemisphere_url = 'https://astrogeology.usgs.gov/search/results?q=hemisphere+enhanced&k1=target&v1=Mars'
browser.visit(hemisphere_url)
html_hemis = browser.html
soup_hemis = BeautifulSoup(html_hemis, 'html.parser')
hemis_links = soup_hemis.find_all('a', class_="itemLink product-item")
print(hemis_links)
#hemisphere = {}
#test_output = browser.find_by_css('a.product-item')[1].click()
#testagain = browser.find_link_by_text('Sample').first
#print(testagain)
#hemisphere['img_url'] = testagain['href']
#hemisphere
#hemisphere['title'] = browser.find_by_css('h2.title').text
#hemisphere
#test_output2 = browser.find_by_css('a.itemLink')[3].click()
links = browser.find_by_css("a.product-item")
number = len(links)
number
hemisphere_image_urls = []
for i in range (number):
    hemisphere = {}
    i = i + 1
    
    print(i)
    try:
        browser.find_by_css('a.product-item')[i].click()
        
    except:
        continue
    
    hemi_href = browser.find_link_by_text('Sample').first
    hemisphere['img_url'] = hemi_href['href']
    hemisphere['title'] = browser.find_by_css('h2.title').text
    
    hemisphere_image_urls.append(hemisphere)
    print(i)
    browser.back()
hemisphere_image_urls<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup