Sep-05-2018, 11:58 PM
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.
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.