Skip to content

Commit

Permalink
Initial code for review
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-martin committed Sep 20, 2024
1 parent 46e9df9 commit 67efbda
Show file tree
Hide file tree
Showing 3 changed files with 418 additions and 0 deletions.
39 changes: 39 additions & 0 deletions selenium-web-automation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Modern Web Automation With Python and Selenium

This folder contains the code for the Real Python tutorial on [Modern Web Automation With Python and Selenium](https://realpython.com/modern-web-automation-with-python-and-selenium/).

## Setup

Create and activate a virtual environment, then install the dependencies:

```sh
(venv) $ python -m pip install -r requirements.txt
```

## Usage

To start streaming music from BandCamp's _Discover_ section, you can execute the script:

```sh
(venv) $ python player.py
```

This will instantiate a `BandLeader` object and call it's `.stream()` method. Music should start playing and you'll see information about the tracks you'll listen to printed to your console.

If you want to interact with the class in a different way, then you can start a REPL session and import `BandLeader`, then go from there:

```python
>>> from player import BandLeader
>>> b = BandLeader()
>>> dir(b)
```

The class will record a history of the songs you listen to in a CSV file.

## Author

Martin Breuss – martin@realpython.com

## License

This project is distributed under the MIT license.
Loading

0 comments on commit 67efbda

Please sign in to comment.