Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basic Syntax/HTML Scrape Questions
#1
Hello,

I imagine this has been answered somewhere else; however I've searched and watched numerous tutorials and still haven't found an answer, so figured I'd just ask.

I'll try to explain this process simply. So I essentially need to do some HTML 'scraping?' , this is for a poker website so I'm hesitant to connect directly to the website (also may not be able to.) Instead I've used Google Inspect to copy the HTML from a popup table from the website and I'm looking to write a function that grabs and prints all the names of players at the table. I've noticed they are all under a div tag "player-name" so I'm thinking that this will make it easier.
So the question is...
I have the html copied into one file in PyCharm
I have a python file opened up in Pycharm
I would like a python function which finds and prints all the text in the HTML under div tags "player-name"
So that I have a list, line by line, of all the player names at the table.

I imagine there are some different ways to go about what I'm trying to do here, so I would appreciate first a function which can reference the html and print this text for me (from a separate file) and then, possibly some different solutions to this issue.

Thank you very much for any effort, much appreciate. I'm very novice at this, so I will be happy to clarify anything that I can if necessary.
Reply


Messages In This Thread
Basic Syntax/HTML Scrape Questions - by sungar78 - Sep-05-2018, 11:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to scrape data from HTML with no identifiers pythonpaul32 2 1,049 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 3,059 Dec-29-2021, 02:26 AM
Last Post: BrandonKastning
  Python Obstacles | Karate | HTML/Scrape Specific Tag and Store it in MariaDB BrandonKastning 8 3,329 Nov-22-2021, 01:38 AM
Last Post: BrandonKastning
  HTML multi select HTML listbox with Flask/Python rfeyer 0 4,828 Mar-14-2021, 12:23 PM
Last Post: rfeyer
  Scrape for html based on url string and output into csv dana 13 5,711 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,446 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,429 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