Git Product home page Git Product logo

cloudscraper-image's Introduction

๐Ÿ–ผ๏ธ Cloudscraper for images

GitHub release (latest SemVer) Docker Hub repository Pylint Pip Audit Code style: black

A tiny Falcon app for requesting images with cloudscraper and returning the image data as a base64 string.

Setup

You can choose to either follow the Docker route or plain (Python) route.

๐Ÿ‹ Docker

Pull or build

docker pull t0shy/cloudscraper-image:latest
# or
docker build -t t0shy/cloudscraper-image:latest --no-cache .

๐Ÿ Plain

Install the requirements with pip.

pip install -r requirements.txt

Run webserver

๐Ÿ‹ Docker

docker run -dit --name cloudscraper-image t0shy/cloudscraper-image:latest

Note: You can remove the container after usage:

docker rm -f cloudscraper-image

๐Ÿ Plain

python setup.py

๐Ÿ“จ Request

๐Ÿ‹ Docker

curl http://<container-ip>:8000/image?url=<encoded-url>

Note: You can get the IP address of the container by running the following command:

docker inspect --format "{{ .NetworkSettings.IPAddress }}" cloudscraper-image

๐Ÿ Plain

curl http://127.0.0.1:8000/image?url=<encoded-url>

๐Ÿ“ฌ Response

The response will be a base64 string. To test/verify if this data is correct, you can use tools like Base64.guru to convert it back to an image.

๐Ÿ› ๏ธ Contribute

To simplify development, a Taskfile.yml is included. While the usage is optional, Task simplifies the setup for your development environment. Installation guide for Task can be found at taskfile.dev/installation.

Pre-commit

Setting up pre-commit code style & quality checks for local development.

pre-commit install

Create container

task up

Quality & Code Style

task check

Code Style fix

task fix

cloudscraper-image's People

Contributors

dependabot[bot] avatar toshy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.