Я хочу, чтобы все красивые выходы супа были в одной строке, а не в новой строке
HTML:
<h1 class="page-title nosp" data-price-promise-enabled="">
<span>SAMSUNG</span>
<span>QE43Q60RATXXU 43" Smart 4K Ultra HD HDR QLED TV with Bixby</span>
</h1>
Код:
try:
title = soup.find('h1', attrs={'class':'page-title nosp'}).text
except:
title = None
Terminal:
PS C:\Users\Zandrio> & C:/Users/Zandrio/AppData/Local/Programs/Python/Python38/python.exe "c:/Users/Zandrio/Documents/Advanced Project/Proxy/currys.py"
SAMSUNG
QE43Q60RATXXU 43" Smart 4K Ultra HD HDR QLED TV with Bixby
Я хочу вывод без пробелов или новой строки
SAMSUNG QE43Q60RATXXU 43" Smart 4K Ultra HD HDR QLED TV with Bixby