def scrape(): mars_dict = mongo.db.mars_dict mars_data = mars_scraper.scrape() mars_dict.update({}, mars_data, upsert=True) return redirect("/", code=302)
def index(): scrape = mars_scraper.scrape() table = scrape[1] mars = mongo.db.mars.find_one() hemi = mongo.db.hemi.find_one() return render_template("index.html", hemi=hemi, mars=mars, table=table)
def scraper(): data = mongo.db.data mars_data = mars_scraper.scrape() data.update({},mars_data,upsert=True) return redirect('/', code=302)
def scraper(): hemi = mongo.db.hemi mars = mongo.db.mars scrape_data = mars_scraper.scrape() mars_data = scrape_data[0] hemi_data = scrape_data[2] hemi.update({}, mars_data, upsert=True) mars.update({}, mars_data, upsert=True) return redirect("/", code=302)
def scrape(): mars = mongo.db.mars mars_data = mars_scraper.scrape() mars.update( {}, mars_data, upsert=True ) return redirect("http://127.0.0.1:5000/", code=302)
def scrape(): print("something") # Run the scrape function mars_data = mars_scraper.scrape() # Update the Mongo database using update and upsert=True mongo.db.collection.update({}, mars_data, upsert=True) # Redirect back to home page return redirect("/")
def scrape(): # Run the scrape function mars_data = mars_scraper.scrape() # Create Mars Collection mars = mongo.db.collection # Update the Mongo database using update and upsert=True mars.update({}, mars_data, upsert=True) # Redirect back to home page return redirect("/")
def scraper(): mars = mongo.db.marsdisplay marsdata = mars_scraper.scrape() print(marsdata) mars.update({}, marsdata, upsert=True) return redirect("/", code=302)
def scraper(): mars_data = mongo.db.mars_data mars_data_data = mars_scraper.scrape() mars_data.update_many({}, {'$set': mars_data_data}, upsert=True) return redirect("/", code=302)
def scrape(): content = db.collection content_data = mars_scraper.scrape() content.update({}, content_data, upsert=True) return redirect("http://localhost:5000/", code=302)