Home > OS >  Python BeautifulSoup resources
Python BeautifulSoup resources

Time:01-04

So, hello. Python begginer and fairly new here as well. I didn't want to do this actually but I can't seem to find any answer anywhere. So I simply (or so I thought) wanna scrape this site to get a random word. I can't seem to find an efficient way on what tags to use in order to filter the html code. Any suggestions or good resources would be really appreciated! In addition, here's my code:

url = 'https://www.randomlists.com/random-words?dup=false&qty=1'
page = requests.get(url)
soup = BeautifulSoup(page.text, 'html.parser')
review_text = soup.find_all(class_='support')
print(review_text)
>> []

I keep changing the find_all() argument but I can't figure out the right one

CodePudding user response:

First of all, try to find some basic tutorials on youtube to learn how can scrap basic websites and how everything works overall. And after that, I recommend to you start studying this book and practice.

CodePudding user response:

Gonna drop a couple resources:

Course: https://automatetheboringstuff.com/chapter11/

YouTube: https://youtu.be/GjKQ6V_ViQE And https://youtu.be/HiOtQMcI5wg

Personal projects:

https://github.com/0sergio-hash/Meal-Plan-scraping-project/blob/a884078eb119ab7ac5d113a8bdab494caad3db05/Meal Plan Project.ipynb

And

https://github.com/0sergio-hash/Amazon-Web-Scraping-project/blob/main/Amazon Web Scraper Project.ipynb

Second project follows along with the second YouTube video with some slight modifications

  •  Tags:  
  • Related