Scrape for "paris coronavirus" images
This commit is contained in:
@@ -4,14 +4,14 @@ from typing import List
|
||||
from bs4 import BeautifulSoup
|
||||
from requests import get
|
||||
|
||||
from constants import FLICKR_URL, URL
|
||||
from constants import FLICKR_URL, DATASET_URL
|
||||
|
||||
|
||||
def format_url(dataset) -> str:
|
||||
"""
|
||||
Constructs the API's URL for the requested dataset
|
||||
"""
|
||||
link = URL.format(dataset)
|
||||
link = DATASET_URL.format(dataset)
|
||||
return link
|
||||
|
||||
|
||||
|
||||
@@ -33,5 +33,5 @@ def map():
|
||||
|
||||
@app.route("/photos")
|
||||
def photos():
|
||||
images = scrape_flickr("paris")
|
||||
images = scrape_flickr("paris coronavirus")
|
||||
return render_template("photos.html", title="Photos", images=images)
|
||||
|
||||
Reference in New Issue
Block a user