Esempio n. 1
0
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)
Esempio n. 2
0
def scrape():
    mars = mongo.db.mars
    mars_web = scrape_mars.scrape_news()
    mars_web = scrape_mars.scrape_marsImg()
    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)