diff --git a/finvizfinance/quote.py b/finvizfinance/quote.py index b4d2dbf..73d4eaf 100644 --- a/finvizfinance/quote.py +++ b/finvizfinance/quote.py @@ -135,19 +135,18 @@ def ticker_fundament(self, raw=True, output_format="dict"): try: fundament_info["Company"] = rows[1].text - ( - fundament_info["Sector"], - fundament_info["Industry"], - fundament_info["Country"], - ) = rows[2].text.split(" | ") + row_split = rows[2].text.split(" | ") + fundament_info["Sector"] = row_split[0] + fundament_info['Industry'] = row_split[1] + fundament_info['Country'] = row_split[2] except IndexError: try: - (_, fundament_info["Company"], _) = rows[0].text.split(' | ') - ( - fundament_info["Sector"], - fundament_info["Industry"], - fundament_info["Country"], - ) = rows[1].text.split(" | ") + row_split = rows[0].text.split(' | ') + fundament_info["Company"] = row_split[1] + row_split = rows[1].text.split(" | ") + fundament_info["Sector"] = row_split[0] + fundament_info['Industry'] = row_split[1] + fundament_info['Country'] = row_split[2] except IndexError: print('Cannot parse Company, Sector, Industry and Country') fundament_info["Company"] = ''