this is my first post here on stackexchange. I am new at python and just started a month or two ago. The project I am working on is a webscraper to take market data off of marketwatch.com. The developer code I am looking at is at the following site.
The scraper I built crawls though multiple pages of a website.
I am trying to use the find_all_next(string=True) It captured all the data I was looking for except for the fact that I get string text that I do not need starting at Copyright 2020.
I want to build a break function that stops the search when it hits ‘Copyright 2020’. After researching for a few hours I am still not sure how to go about it.
I feel like I am in the right direction but I do not know how to build a function to stop its search at an exact point.
for cont3 in boeing_financials: table_data = cont3.find_all('table', class_='crDataTable') for data in table_data: d = data.find_all('tbody') for string in d: string_cheese = string.find_all_next(string=True) print(string_cheese) break