Jan-02-2020, 08:28 PM
Hello Everyone,
I've been trying to parse an HTML page in order to get a simple price but I can't succeed, I tried to get help from youtube tutorials and from many websites but I need your help.
Thank you very much in advance.
Happy new year
I've been trying to parse an HTML page in order to get a simple price but I can't succeed, I tried to get help from youtube tutorials and from many websites but I need your help.
page_options_cac40 ="https://live.euronext.com/fr/product/index-options/PXA-DPAR" import bs4 import requests from bs4 import BeautifulSoup def get_all_strikes(): r=requests.get(page_options_cac40) page = bs4.BeautifulSoup(r.text,"html.parser") #<td class=" font-weight-bold">4400.00</td> <--- line with the code and the strike to find premier_strike = page.find('td', attrs={'class': 'font-weight-bolde'}) print(premier_strike)I'd like to get the first strike price which is 4400. The code runs but returns "None"....
Thank you very much in advance.
Happy new year