Playwright-Tutorial icon indicating copy to clipboard operation
Playwright-Tutorial copied to clipboard

Learn how to use Playwright / Patchwright for Web Scraping and become 100% undetectable!

Playwright Tutorial

Watch the full tutorial on my YouTube Channel

Prerequisites

  • Python 3.11+

Installation

1. Clone the repository:

git clone https://github.com/ThomasJanssen-tech/Playwright-Tutorial
cd Playwright-Tutorial

2. Create a virtual environment

python -m venv venv

3. Activate the virtual environment

venv\Scripts\Activate
(or on Mac): source venv/bin/activate

4. Install libraries

pip install -r requirements.txt

5. Configuration

  • Rename the .env.example file to .env
  • Get your free AgentQL API Key: https://www.agentql.com/?utm_source=YouTube&utm_medium=Creators&utm_id=Janssen_102024
  • Add your AgentQL API key

Executing the scripts

  • Open a terminal in VS Code

  • Execute the following command:

python playwright_scraping_indeed.py
python scraping_with_agentql.py
python patchright_scraping_indeed.py