Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basic Syntax/HTML Scrape Questions
#2
Utilize the browser's inspection. Find the location in the page where it lists the player names that you are looking to grab. Copy them and Right click (Firefox -> Inspect Element) (Chrome->Inpect) This will allow you to navigate around the HTML and make it easier to find the proper tags to look for. This is much quicker and reliable than just looking through the entire HTML file. It also lets you compare and contrast tags and view which one is selected. This will show you what exactly you need to parse.

a div tag doesnt have a name, so i am assuming the "player-name" is actually a class name? If that is the case you could search for div tags with class names "player-name"

soup.find_all('div', {'class':'player-name'}) but most likely will not be exactly that as each website may need it to be done a little differently depending on the html structure. We would have to see the html to give a better description
Recommended Tutorials:
Reply


Messages In This Thread
Basic Syntax/HTML Scrape Questions - by sungar78 - Sep-05-2018, 11:58 PM
RE: Basic Syntax/HTML Scrape Questions - by metulburr - Sep-06-2018, 01:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to scrape data from HTML with no identifiers pythonpaul32 2 940 Dec-02-2023, 03:42 AM
Last Post: pythonpaul32
Lightbulb Python Obstacles | Kung-Fu | Full File HTML Document Scrape and Store it in MariaDB BrandonKastning 5 2,973 Dec-29-2021, 02:26 AM
Last Post: BrandonKastning
  Python Obstacles | Karate | HTML/Scrape Specific Tag and Store it in MariaDB BrandonKastning 8 3,256 Nov-22-2021, 01:38 AM
Last Post: BrandonKastning
  HTML multi select HTML listbox with Flask/Python rfeyer 0 4,724 Mar-14-2021, 12:23 PM
Last Post: rfeyer
  Scrape for html based on url string and output into csv dana 13 5,625 Jan-13-2021, 03:52 PM
Last Post: snippsat
  Python3 + BeautifulSoup4 + lxml (HTML -> CSV) - How to loop to next HTML/new CSV Row BrandonKastning 0 2,405 Mar-22-2020, 06:10 AM
Last Post: BrandonKastning
  scrape data 1 go to next page scrape data 2 and so on alkaline3 6 5,316 Mar-13-2020, 07:59 PM
Last Post: alkaline3

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020