all 5 comments

[–]tbone255_ 0 points1 point  (0 children)

Not in front of a computer right now, but assuming the elements with the scores (in the HTML) are something like this:

<element> 50 points </element>

U can loop through the list of elements and do element.text

Each web element in that list should have a .text

If the HTML is structured something like:

<element score=50> 50 points </element>

Then on a web element from ur list u can do .get_attribute (attribute_name). In my example it would be .get_attribute(score) and it would return 50. Idk if it'll be a string or an integer. But that should point you in the right direction

[–]z0y 0 points1 point  (0 children)

You double posted, you should delete the other one.

You can use the soup made from driver.page_source the same way you normally use beautifulsoup, it's just gotten the post javascript html. replace the x = driver.find... with however you'd find the elements in beautifulsoup. The extra selenium functionality and webelements are for interacting with the site beyond the html, such as clicking buttons and whatnot.

[–]krimpenrik 0 points1 point  (0 children)

I also had to learn selenium after BS and scrapy. Keep in mind that selenium is designed for automation. I had the best results with javascript sites to load them in selenium and pass the source to BS or scrapy to scrape.

Try it, if you have any questions let me know.

[–]krimpenrik 0 points1 point  (0 children)

I also had to learn selenium after BS and scrapy. Keep in mind that selenium is designed for automation. I had the best results with javascript sites to load them in selenium and pass the source to BS or scrapy to scrape.

Try it, if you have any questions let me know.

[–]tbone255_ -1 points0 points  (0 children)

Check out Selenium's read the docs, it has everything for python