Skip to content

Tag: beautifulsoup

Beautiful Soup Nested Tag Search

I am trying to write a python program that will count the words on a web page. I use Beautiful Soup 4 to scrape the page but I have difficulties accessing nested HTML tags (for example: <p class=”hello”> inside <div>). Every time I try finding such tag using page.findAll() (page is Bea…

Exact website links from google through BeautifulSoup

I want to search google using BeautifulSoup and open the first link. But when I opened the link it shows error. The reason i think is that because google is not providing exact link of website, it has added several parameters in url. How to get exact url? When i tried to use cite tag it worked but for big

BeautifulSoup find_all limited to 50 results?

I’m trying to get the results from a page using BeautifulSoup: I read this previous solution: Beautiful Soup findAll doesn’t find them all and I tried html.parser, lxml and html5lib, but none of them return more than 50 results. Any suggestions? Answer Try using css-selector query.

BeautifulSoup – search by text inside a tag

Observe the following problem: For some reason, BeautifulSoup will not match the text, when the <i> tag is there as well. Finding the tag and showing its text produces Right. According to the Docs, soup uses the match function of the regular expression, not the search function. So I need to provide the …