Giter Site home page Giter Site logo

mars_news's Introduction

Mars News

Project background

This application includes scraped data from a series of websites, stored locally in a MongoDB database, then repurposed into a webpage that contains facts and images about Mars.

This Flask app uses splinter (Selenium), MongoDB, Beautiful Soup and Pandas. It was designed using Bootstrap.

What's in this repo

  • A Jupyter notebook, including Python code to scrape the data and store it in a MongoDB database
  • scrape_mars.py, containing the executable code for use in the Flask app
  • A Flask app that powers a webpage to display the data
  • A templates folder that contains the webpage

mars_news's People

Contributors

skonkiel avatar

mars_news's Issues

Fix error caused by NASA website / add try-except error handling

Behavior: Page loads OK initially, but when you press "Scrape data" button, the app breaks because the NASA page data isn't being scraped properly, and there's no try/except error handling to return a user-friendly error message.

Notes from discussion with Garrett:

  • The higher up in the DOM, the less likely it is that the attribute ID/class will change
  • Use Try/Except/Finally
  • Use loops to look for content in page (get all li where class=“slide”, then return everything in it; if class = specific div I’m looking for, then do the thing. Otherwise, return error message to API (so user doesn't see it).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.