Python Tutorial: Web Scraping NBA Stats with Python Selenium

Pubblicato il: 30 agosto 2020
sul canale di: Nick's Niche
2,176
52

Welcome back to the next part in our Python for Daily Fantasy Sports Series!
In this video we are going to be learning how to use URL string manipulation to ease the burden of web navigation. Previously, we have reviewed how to open a webpage, navigate through the page source to find elements to select and update with Selenium, now, we will be showing how to loop over several years worth of data by simply manipulating the URL and placing everything in a for loop.

Check me out on Patreon!
  / nicksniche  

VIDEO LINKS:
NBA ADVANCED STATS:
https://stats.nba.com/players/advance...



Requirements::
Selenium Tutorial Episode 1:
   • Selenium Basics: Web Scraping Tutoria...  
+
Selenium Tutorial Episode 2:
   • Scrape NBA Advanced Stats with Python...  
+
Everything from BS4 Tutorial
+
Firefox -- https://www.mozilla.org/en-US/firefox...
+
Pip Install Selenium
https://www.selenium.dev/selenium/doc...
+
Gecko Driver
Download -- https://github.com/mozilla/geckodrive...
More Information -- https://www.softwaretestinghelp.com/g...

Gecko Explanation
Gecko is basically an interface that allows firefox to be controlled by a third
party, aka your python code. You must be up to date on firefox and gecko, if you
write some code that works, and it later stops working, this is a likely issue.

Selenium Documentation
--Important functions/process needed for
Finding elements
Selecting elements
These tactics allow us to automate interactions with the webpages, which
makes larger scale web scraping MUCH more efficient.

For Example:
NBA.com stats, each page will need to be interacted with to pull the
stat base. URL can only bring us to the landing page of top 50 results.
URL can be looped to cover different stat pages, but we will need to
interact with the webpage itself to move forward.

Why it is important to understand how to inspect the elements on the page,
very similar to the way we established the table we wanted to use in the
beautiful soup tutorial. Now, we will need to identify the elements on the
page that we want to interact with, then how to interact with them.


In questa pagina del sito puoi guardare il video online Python Tutorial: Web Scraping NBA Stats with Python Selenium della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Nick's Niche 30 agosto 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,176 volte e gli è piaciuto 52 spettatori. Buona visione!