Following is the solution to get the bolded text
from bs4 import BeautifulSoup
import requests
source = requests.get('https://www.dailyfx.com/sentiment-report').text
soup = BeautifulSoup(source, 'lxml')
#print(soup.prettify())
price = soup.find_all('span', {'class' : 'gsstx', 'style':"font-weight:bold;"})
for i in price:
print(i.get_text())
Output is as below
Retail trader data shows 45.48% of traders are net-long with the ratio of traders short to long at 1.20 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-short suggests AUD/JPY prices may continue to rise.
Retail trader data shows 56.52% of traders are net-long with the ratio of traders long to short at 1.30 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-long suggests AUD/USD prices may continue to fall.
Retail trader data shows 58.91% of traders are net-long with the ratio of traders long to short at 1.43 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-long suggests Oil - US Crude prices may continue to fall.
Retail trader data shows 44.67% of traders are net-long with the ratio of traders short to long at 1.24 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-short suggests Germany 30 prices may continue to rise.
Retail trader data shows 76.68% of traders are net-long with the ratio of traders long to short at 3.29 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-long suggests EUR/CHF prices may continue to fall.
Retail trader data shows 73.68% of traders are net-long with the ratio of traders long to short at 2.80 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-long suggests EUR/GBP prices may continue to fall.
Retail trader data shows 39.30% of traders are net-long with the ratio of traders short to long at 1.54 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-short suggests EUR/JPY prices may continue to rise.
Retail trader data shows 59.76% of traders are net-long with the ratio of traders long to short at 1.49 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-long suggests EUR/USD prices may continue to fall.
Retail trader data shows 28.01% of traders are net-long with the ratio of traders short to long at 2.57 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-short suggests France 40 prices may continue to rise.
Retail trader data shows 34.28% of traders are net-long with the ratio of traders short to long at 1.92 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-short suggests FTSE 100 prices may continue to rise.
Retail trader data shows 39.83% of traders are net-long with the ratio of traders short to long at 1.51 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-short suggests GBP/JPY prices may continue to rise.
Retail trader data shows 60.04% of traders are net-long with the ratio of traders long to short at 1.50 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-long suggests GBP/USD prices may continue to fall.
Retail trader data shows 78.26% of traders are net-long with the ratio of traders long to short at 3.60 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-long suggests Gold prices may continue to fall.
Retail trader data shows 62.12% of traders are net-long with the ratio of traders long to short at 1.64 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-long suggests NZD/USD prices may continue to fall.
Retail trader data shows 96.23% of traders are net-long with the ratio of traders long to short at 25.54 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-long suggests Silver prices may continue to fall.
Retail trader data shows 49.36% of traders are net-long with the ratio of traders short to long at 1.03 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-short suggests US 500 prices may continue to rise.
Retail trader data shows 48.09% of traders are net-long with the ratio of traders short to long at 1.08 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-short suggests USD/CAD prices may continue to rise.
Retail trader data shows 77.47% of traders are net-long with the ratio of traders long to short at 3.44 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-long suggests USD/CHF prices may continue to fall.
Retail trader data shows 32.86% of traders are net-long with the ratio of traders short to long at 2.04 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-short suggests USD/JPY prices may continue to rise.
Retail trader data shows 41.61% of traders are net-long with the ratio of traders short to long at 1.40 to 1.
We typically take a contrarian view to crowd sentiment, and the fact traders are net-short suggests Wall Street prices may continue to rise.
1
For skipping use following code (Specific to the case)
from bs4 import BeautifulSoup
import requests
source = requests.get('https://www.dailyfx.com/sentiment-report').text
soup = BeautifulSoup(source, 'lxml')
#print(soup.prettify())
price = soup.find_all('span', {'class' : 'gsstx', 'style':"font-weight:bold;"})
skip = 0
for i in price:
if skip%2==0:
print(i.get_text())
skip+=1
New Output
Retail trader data shows 45.48% of traders are net-long with the ratio of traders short to long at 1.20 to 1.
Retail trader data shows 56.52% of traders are net-long with the ratio of traders long to short at 1.30 to 1.
Retail trader data shows 58.91% of traders are net-long with the ratio of traders long to short at 1.43 to 1.
Retail trader data shows 44.67% of traders are net-long with the ratio of traders short to long at 1.24 to 1.
Retail trader data shows 76.68% of traders are net-long with the ratio of traders long to short at 3.29 to 1.
Retail trader data shows 73.68% of traders are net-long with the ratio of traders long to short at 2.80 to 1.
Retail trader data shows 39.30% of traders are net-long with the ratio of traders short to long at 1.54 to 1.
Retail trader data shows 59.76% of traders are net-long with the ratio of traders long to short at 1.49 to 1.
Retail trader data shows 28.01% of traders are net-long with the ratio of traders short to long at 2.57 to 1.
Retail trader data shows 34.28% of traders are net-long with the ratio of traders short to long at 1.92 to 1.
Retail trader data shows 39.83% of traders are net-long with the ratio of traders short to long at 1.51 to 1.
Retail trader data shows 60.04% of traders are net-long with the ratio of traders long to short at 1.50 to 1.
Retail trader data shows 78.26% of traders are net-long with the ratio of traders long to short at 3.60 to 1.
Retail trader data shows 62.12% of traders are net-long with the ratio of traders long to short at 1.64 to 1.
Retail trader data shows 96.23% of traders are net-long with the ratio of traders long to short at 25.54 to 1.
Retail trader data shows 49.36% of traders are net-long with the ratio of traders short to long at 1.03 to 1.
Retail trader data shows 48.09% of traders are net-long with the ratio of traders short to long at 1.08 to 1.
Retail trader data shows 77.47% of traders are net-long with the ratio of traders long to short at 3.44 to 1.
Retail trader data shows 32.86% of traders are net-long with the ratio of traders short to long at 2.04 to 1.
Retail trader data shows 41.61% of traders are net-long with the ratio of traders short to long at 1.40 to 1.