i’m trying to scrape and list 24 items from a certain website. instead, it shows the same item 24 times. to get the first price i did this: as said, it does print 24 lines. but instead of listing all the different ones, it just lists the first result (probably because the i = 0). i’m very bad at coding
Tag: beautifulsoup
Trying to get only the text between two strong tags
I am currently trying to get only the HTML text (a list of names) that is between the first two occurrences of the strong tag. Here is a short example of the HTML I scraped Hers is some quick code that I wrote with the basic logic of counting the number of strong tags occurring. I know after the second
Web scraping Trulia with Pythons Selenium
I am trying to webscrape the trulia estimate for a given address. Although some addresses do not have a trulia estimate. So I want to first try to find the text ‘Trulia estimate’ and if it is found then I will try to find the value. At the moment I cannot figure out how to find the Trulia Estimate text
How to display hidden html elements using BeautifulSoup?
I’m trying to scrape video from the website. I can find the video link using Chrome DevTools. But when I use BeautifulSoup to get the video link. The link is hidden. Please help modify the code below to get the video link. There is the screenshot of the Chrome DevTools. Basically, I need the ‘src’ of the ‘video’ tag. Please
How to remove target tr block using beautifulsoup
I want to remove target tr block with text, when i run it i got perfect output but there is a problem i have seen that it scraping <tr><td>Domain</td><td>Last Resolved Date</td></tr> actually i don’t want this line in my output so how can i remove it.Code bellow Got fix Old Code Fixed Answer Try the code.
Python & BS4 – Strange behaviour, scraper freezes/stops working after a while without an error
I’m trying to scrape eastbay.com for Jordans. I have set up my scraper using BS4 and it works, but never finishes or reports an error, just freezes at some point. The strange thing is that it stops at some point and pressing CTRL+C in the Python console (where it’s outputting the prints as it’s running) does nothing, but it is
Can this beautifulsoup script be simplified with Regex?
I wrote some beautifulsoup scripts, and one part seems really redundant, I am thinking if it can be simplified with Regex. All posts from this forum are marked with different colors, what I did is to search each color with one line. For six colors I did six lines with only one words difference. I am not sure if it
pandas read_html – no tables found
I am attempting to see if I can read a table of data from WU.com, but I am getting a type error for no tables found. (first timer on web scraping too here) There is also another person with a very similar stackoverflow question here with WU table of data, but the solution is a little bit complicated to me.
Scraping from beautifulsoup in Python with a for loop just returns the last result
I’m trying to scrape data from a webpage using beautifulsoup and (ultimately) output it into a csv. As a first step in this, I’ve tried to get the text of the relevant table. I managed to do this, but the code no longer gives me the same output when I rerun it: instead of returning all 12372 records when I
Scraping Amazon products names
I am trying to gather the first two pages products names on Amazon based on seller name. When I request the page, it has all elements I need ,however, when I use BeautifulSoup – they are not being listed. Here is my code: The links of products are not listed. If the Amazon API gives this information, I am open