Skip to content

This project demonstrates how to use Playwright to automate the browser. It uses proxies to bypass various anti-bot measures. It can also be used to scrape data from websites.

License

Notifications You must be signed in to change notification settings

arman-bd/haide-the-playwright

Repository files navigation

heide the playwright

This project demonstrates how to use Playwright to automate the browser. It uses proxies to bypass various anti-bot measures. It can also be used to scrape data from websites. It is written in TypeScript, Express and uses Node.js as the runtime.

The project uses Docker and Docker Compose to run the application. It is also possible to run the application without Docker.

Requirements

The project requires the following to be installed:

Installation

After installing the requirements, clone the repository and install the dependencies:

git clone https://github.com/arman-bd/haide-the-playwright.git
cd haide-the-playwright
npm install

Configuration

The project requires a list of proxies to be available inside .proxies file. If the proxies are not available, the application will work without proxies. If the proxy requires authentication, the username and password should be provided. Otherwise, the username and password should be omitted.

Fomat of the proxy file:

username:password@http://ip:port
socks5://ip:port

Running

You can run the project in development mode by running the following command:

npm run dev

This will start the server on port 8800. You can access the API at http://localhost:8900.

Running using Docker Compose

You can also run the project using Docker. To do so, run the following command:

docker-compose up --build -d

The command will build the Docker image and start the container in detached mode. You can access the API at http://localhost:8900.

API

The application currently has the following API(s):

  • GET /: Returns a simple message to indicate that the API is working.
  • GET /ping: Returns a ping response with Timestamp.
  • GET /task/screenshot?url={url}: Returns a screenshot of the given URL.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This project is for educational purposes only. It is not intended to be used for any production purposes. The author is not responsible for any misuse or damage caused by this project. Use it at your own risk.

References

About

This project demonstrates how to use Playwright to automate the browser. It uses proxies to bypass various anti-bot measures. It can also be used to scrape data from websites.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published