def scraper():

    # listings = mongo.db.listings

    # listings_data = scrape_craigslist.scrape()

    mars = mongo.db.mars

    mars_web = scrape_mars.scrape_news()

    mars_web = scrape_mars.scrape_marsImg()

    mars_web = scrape_mars.scrape_marsTwitter()

    mars_web = scrape_mars.scrape_marsFacts()

    mars_web = scrape_mars.scrape_marsHemi1()

    mars_web = scrape_mars.scrape_marsHemi2()

    mars_web = scrape_mars.scrape_marsHemi3()

    mars_web = scrape_mars.scrape_marsHemi4()

    mars.update({}, mars_web, upsert=True)

    return redirect("/", code=302)
Exemple #2
0
def scrape():

    # Run the scrape function
    # mars = client.db.mars
    mars = mongo.db.mars
    mars_web = scrape_mars.scrape_news()
    mars_web = scrape_mars.scrape_marsImage()
    mars_web = scrape_mars.scrape_marsTwitter()
    mars_web = scrape_mars.scrape_marsFacts()
    mars_web = scrape_mars.scrape_marsH1Cerberus()
    mars_web = scrape_mars.scrape_marsH2Schiaparelli()
    mars_web = scrape_mars.scrape_marsH3SyrtisMajor()
    mars_web = scrape_mars.scrape_marsH4VallesMarineris()

    mars.update({}, mars_web, upsert=True)

    return redirect("/", code=302)
Exemple #3
0
def scrape():

    # Run the scrape function
    # mars = client.db.mars
    mars = mongo.db.mars
    mars_web = scrape_mars.scrape_news()
    mars_web = scrape_mars.scrape_marsImage()
    mars_web = scrape_mars.scrape_marsTwitter()
    mars_web = scrape_mars.scrape_marsFacts()
    mars_web = scrape_mars.scrape_marsH1Cerberus()
    mars_web = scrape_mars.scrape_marsH2Schiaparelli()
    mars_web = scrape_mars.scrape_marsH3SyrtisMajor()
    mars_web = scrape_mars.scrape_marsH4VallesMarineris()

    # Update the Mongo Database using update and upsert=True
    mars.update({}, mars_web, upsert=True)

    # Redirect back to home page
    return redirect("/", code=302)