Skip to content
Advertisement

Tag: beautifulsoup

Python Selenium – How To Click a Non Button Element [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 1 year ago. Improve this question Ive Been Trying to Click a Button on https://blockchain.coinmarketcap.com/chain/bitcoin But With No Success

how should i scrape href links from this website?

I’m trying to get every products individual URL link from this link https://www.goodricketea.com/product/darjeeling-tea .How should I do that with beautifulsoup? Is there anyone who can help me? Answer To get product links from this site, you can for example do: Prints:

I want to replace the html code with my own

I am using lxml and beautifulsoup library, actually my goal is to translate text of the specific tags out of the whole html code, what I want is, I want to replace the text of specific tags with the translated text. I want to set a loop for the specific xpath in which all the translated text should be inserted

How can I wrap all BeautifulSoup existing find/select methods in order to add additional logic and parameters?

I have a repetitive sanity-check process I go through with most calls to a BeautifulSoup object where I: Make the function call (.find, .find_all, .select_one, and .select mostly) Check to make sure the element(s) were found If not found, I raise a custom MissingHTMLTagError, stopping the process there. Attempt to retrieve attribute(s) from the element(s) (using .get or getattr) If

bs4 p tags returning as None

// scraping link from title, then opening that link and trying to scrape the whole article, very new to this so I don’t know what to do! Answer On some pages the <p> tags are not under an <article>, and therefor is returning None. Instead, to scrape all the paragraphs (and <li> tags if they exist) use the following CSS

Advertisement