Skip to content
Advertisement

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 Beautiful Soup object containing the whole page) method it

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 – find table with specified class on Wikipedia page

I am trying to find a table in a Wikipedia page using BeautifulSoup and for some reason I don’t get the table. Can anyone tell why I don’t get the table? my code: prints: None Answer You shouldn’t use jquery-tablesorter to select against in the response you get from requests because it is dynamically applied after the page loads. If

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 DOTALL flag: Alright. Looks good. Let’s try

Advertisement