stellarDev0503 / web-scraping-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python-web-scraping-examples

BandLeader

The code sample found in bandleader.py accompanies this post on realpython.com. It introduces the reader to using Python to control headless web browsers. Specifically, bandleader.py lets you play music from bandcamp through your Python shell!

To play around with bandleader.py, see the the tutorial for setting up, then run something like:

>>> from bandleader import BandLeader
>>> bl = BandLeader('myhistory.csv')
>>> bl.play()            # should start playing a track

>>> bl.play(3)           # plays the third track in the listing

>>> bl.play_next()       # advances the track
 
>>> bl.more_tracks()     # see more music to play with

>>> bl.browser.quit()    # close the webdriver instance

About


Languages

Language:Python 100.0%