mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-04 16:57:32 +08:00
@ -21,4 +21,4 @@ if __name__ == "__main__":
|
||||
if link.text == "Maps":
|
||||
webbrowser.open(link.get("href"))
|
||||
else:
|
||||
webbrowser.open(f"http://google.com{link.get('href')}")
|
||||
webbrowser.open(f"https://google.com{link.get('href')}")
|
||||
|
@ -29,4 +29,4 @@ if __name__ == "__main__":
|
||||
"year": 2018,
|
||||
"hl": "en",
|
||||
}
|
||||
print(get_citation("http://scholar.google.com/scholar_lookup", params=params))
|
||||
print(get_citation("https://scholar.google.com/scholar_lookup", params=params))
|
||||
|
@ -1,7 +1,7 @@
|
||||
import requests
|
||||
|
||||
APPID = "" # <-- Put your OpenWeatherMap appid here!
|
||||
URL_BASE = "http://api.openweathermap.org/data/2.5/"
|
||||
URL_BASE = "https://api.openweathermap.org/data/2.5/"
|
||||
|
||||
|
||||
def current_weather(q: str = "Chicago", appid: str = APPID) -> dict:
|
||||
|
@ -10,7 +10,7 @@ def get_gifs(query: str, api_key: str = giphy_api_key) -> list:
|
||||
Get a list of URLs of GIFs based on a given query..
|
||||
"""
|
||||
formatted_query = "+".join(query.split())
|
||||
url = f"http://api.giphy.com/v1/gifs/search?q={formatted_query}&api_key={api_key}"
|
||||
url = f"https://api.giphy.com/v1/gifs/search?q={formatted_query}&api_key={api_key}"
|
||||
gifs = requests.get(url).json()["data"]
|
||||
return [gif["url"] for gif in gifs]
|
||||
|
||||
|
Reference in New Issue
Block a user