Pep8 formatting changes
This commit is contained in:
parent
92577330b6
commit
2158998009
|
@ -241,19 +241,24 @@ def check_currency(response: str):
|
||||||
if tag and tag['href'] == 'https://g.co/gfd':
|
if tag and tag['href'] == 'https://g.co/gfd':
|
||||||
currency1 = soup.find(class_="xUrNXd UMOHqf")
|
currency1 = soup.find(class_="xUrNXd UMOHqf")
|
||||||
currency2 = soup.select_one('.kCrYT'
|
currency2 = soup.select_one('.kCrYT'
|
||||||
' .BNeawe.iBp4i.AP7Wnd .BNeawe.iBp4i.AP7Wnd')
|
' .BNeawe.iBp4i.AP7Wnd '
|
||||||
|
'.BNeawe.iBp4i.AP7Wnd')
|
||||||
currency1 = currency1.text.rstrip('=').split(' ', 1)
|
currency1 = currency1.text.rstrip('=').split(' ', 1)
|
||||||
currency2 = currency2.text.split(' ', 1)
|
currency2 = currency2.text.split(' ', 1)
|
||||||
return [float(currency1[0]), currency1[1], float(currency2[0]), currency2[1]]
|
return [float(currency1[0]), currency1[1],
|
||||||
|
float(currency2[0]), currency2[1]]
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def add_currency_b(soup: BeautifulSoup, conversion_details: list) -> BeautifulSoup:
|
def add_currency_b(soup: BeautifulSoup,
|
||||||
|
conversion_details: list) -> BeautifulSoup:
|
||||||
"""Adds the conversion input boxes to the search result
|
"""Adds the conversion input boxes to the search result
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
soup: The parsed search result containing currency conversion
|
soup: The parsed search result
|
||||||
conversion_details: floating point number to be used for conversion
|
containing currency conversion
|
||||||
|
conversion_details: Floating point number
|
||||||
|
to be used for conversion
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
BeautifulSoup
|
BeautifulSoup
|
||||||
|
|
Loading…
Reference in New Issue
Block a user