Use f-strings

This commit is contained in:
Samuel Sloniker 2021-12-04 18:46:49 -08:00
parent 9f1bd098bc
commit 1bd1ced732
2 changed files with 3 additions and 3 deletions

View File

@ -1,9 +1,9 @@
`stockquotes` is a simple Python module for collecting stock/ETF and mutual fund (see #2) quotes and
`stockquotes` is a simple Python module for collecting stock/ETF and mutual fund quotes and
historical data from Yahoo! Finance. It's perfect for developers who can't
afford the (often high) prices charged by many stock data APIs.
# Requirements
* Python 3.5+
* Python 3.6+
* Beautiful Soup 4
# Installation

View File

@ -41,7 +41,7 @@ class Stock:
def __init__(self, ticker):
try:
r = requests.get(
"https://finance.yahoo.com/quote/{}/history".format(ticker),
f"https://finance.yahoo.com/quote/{ticker}/history",
headers={
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:92.0) Gecko/20100101 Firefox/92.0"
},