<jupyter_start><jupyter_text>Mars Space Images<jupyter_code>url='https://spaceimages-mars.com'
browser.visit(url)
from pprint import pprint
print(BeautifulSoup(browser.html).prettify())
#object
html = browser.html
#Parse HTML BeautifulSoup
soup = BeautifulSoup(html,'html.parser')
# Image url
link=soup.find('a',class_='showing fancybox-thumbs')

featured_image_url=url
featured_image_url<jupyter_output><empty_output><jupyter_text>Mars Facts<jupyter_code>url = 'https://galaxyfacts-mars.com'
tables=pd.read_html(url)
tables[0]
df=tables[0]
df.columns = ['description','Mars','Earth']
df.set_index('description',inplace=True)
df
html_table= df.to_html()
html_table.replace('class="dataframe" ','  class=  "table table-striped" ')
html_table.replace('\n','')
df.to_html('table.html')
!open table.html<jupyter_output><empty_output><jupyter_text>Mars Hemisphere<jupyter_code>url = 'https://marshemispheres.com'
from pprint import pprint
print (BeautifulSoup(browser.html).prettify())
#scrape page into Soup hemisphere_img_url = url
driver = webdriver.Chrome
html =browser.html
soup= bs(html,'html.parser')

url = ('https://marshemispheres.com')

response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
cerberus_img= soup.find_all('div',class_="wide-image-wrapper")
print(cerberus_img)
for img in cerberus_img:
    pic = img.find('li')
    full_img = pic.find('a')['href']
    print(full_img)
cerberus_title = soup.find('h2', class_='title').text
print(cerberus_title)
cerberus_hem = {"Title": cerberus_title, "url": full_img}
print(cerberus_hem)
shiaparelli_img= soup.find_all('div',class_="wide-image-wrapper")
shiaparelli_img
for img in shiaparelli_img:
    pic = img.find('li')
    full_img = pic.find('a')['href']
    print(full_img)
shiaparelli_title = soup.find('h2', class_='title').text
print(shiaparelli_title)
shiaparelli_hem = {"Title": shiaparelli_title, "url": full_img}
print(shiaparelli_hem)
syrtris_img = soup.find_all('div', class_="wide-image-wrapper")
print(syrtris_img)

for img in syrtris_img:
    pic = img.find('li')
    full_img = pic.find('a')['href']
    print(full_img)
syrtris_title = soup.find('h2', class_='title').text
print(syrtris_title)
syrtris_hem = {"Title": syrtris_title, "url": full_img}
print(syrtris_hem)
valles_marineris_img = soup.find_all('div', class_="wide-image-wrapper")
print(valles_marineris_img)
url = ('https://marshemispheres.com/')
#first_request= driver.request(url)
response= webdriver.get(url)
soup = BeautifulSoup(webdriver.text,'html.parser')
for img in valles_marineris_img:
    pic = img.find('li')
    full_img = pic.find('a')['href']
    print(full_img)
valles_marineris_title = soup.find('h2', class_='title').text
print(valles_marineris_title)
valles_marineris_hem = {"Title": valles_marineris_title, "url": full_img}
print(valles_marineris_hem)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15623907724571828, 'fraction_numerical': 0.0020971688220901784, 'mean_word_length': 7.672727272727273, 'pattern_counts': {'":': 8, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '586828', 'license': 'ADSL', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1107, 'n_words': 167, 'path': '.ipynb_checkpoints/mission_to_mars-checkpoint.ipynb', 'repo_name': 'RRbenitez77/web-scraping-challenge', 'size': '2861'}