Skip to content

Tag: beautifulsoup

Python BeautifulSoup4 news scraper giving odd error

I am trying to make a news scraper with BS4 and I am able to get the html code from the website (cnn) and this is my code: but its giving me this error I have no idea what is causing this, Thanks! Answer If the string topic is not found on the page, then prices will be an empty

Extract full text from different tags and outside them

I want to extract all text information from the already scrapped readme files from github. There is text between Html tags but there is also a lot of text outside (between) tags. Tags are different because those are different readmes so the authors do not follow any particular rules. I want to extract text fr…