FAufenger / web-scraping-mars

A web application that scrapes various websites for data related to the Mission to Mars and displays the information in a single HTML page

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

web-scraping-challenge

This assignment builds a web application that scrapes various websites for data related to the Mission to Mars and displays the information in a single HTML page

Back end searching

back end sampeling

  • Converted Jupyter notebook into a Python script called scrape_mars.py with a function called scrape that executes all of the scraping code returns one Python dictionary containing all of the scraped data.

code sampeling

  • Created a route called /scrape that imports the scrape_mars.py script and calls the scrape function, storing the return value in Mongo as a Python dictionary.

  • Created a root route / that queries the Mongo database and passes the mars data into an HTML template to display the data.

routes sampeling

  • Created a template HTML file called index.html that takes the mars data dictionary and displays all of the data in the appropriate HTML elements.

This resulted in a page that looks like the images below:

Sample Page

About

A web application that scrapes various websites for data related to the Mission to Mars and displays the information in a single HTML page


Languages

Language:Jupyter Notebook 58.5%Language:Python 32.3%Language:HTML 9.2%