Giter Club home page Giter Club logo

screenshot's Introduction

Screenshot

A python tool to take screenshots of web pages from list of urls.

How to install it

You need to set a python environment. Then, in your shell, type:

git clone [email protected]:MiguelLaura/screenshot.git
cd screenshot
make deps

You also need to have chrome installed on your computer.

Available commands

usage: python -m screenshot.cli [-h] [--version] {authenticate,take} ...

positional arguments:
  {authenticate,take}
    authenticate       authenticate in a browser and save browser info in a authenticate_folder
    take               take screenshot

optional arguments:
  -h, --help           show this help message and exit
  --version            show program's version number and exit

Take

For now, with the option --authenticate, this command works with a headed browser. To create an authenticate_folder, you can use the authenticate command (documentation below). If you want to be connected to some accounts, we advise you to connect in your browser and use the --cookies option.

usage: python -m screenshot.cli take [-h] [--output OUTPUT] [--authenticate AUTHENTICATE] [--cookies] [--throttle] column [file] directory

positional arguments:
  column                column where the urls are or a single url
  file                  file where the urls are. Defaults to None
  directory             name of the directory where we should put the screenshots

optional arguments:
  -h, --help            show this help message and exit
  --output OUTPUT, -o OUTPUT
                        output file with the files name
  --authenticate AUTHENTICATE, -a AUTHENTICATE
                        authenticate_folder where the browser info are (useful for Facebook, Twitter...). Not compatible with
                        'cookies'
  --cookies, -c         get cookies from chrome (won't work for Facebook, Twitter). Not compatible with 'authenticate'
  --throttle THROTTLE, -t THROTTLE
                        time to wait between accessing to an other URL. Defaults to 0

Authenticate

This command is useful if you want to use the --authenticate argument of the take command. It will open a browser where you'll be able to log into some plateform you want to take screenshot of. This command is here as a result of experimentations.

usage: python -m screenshot.cli authenticate [-h] folder

positional arguments:
  folder      folder name where the browser info must be saved

optional arguments:
  -h, --help  show this help message and exit

screenshot's People

Contributors

miguellaura avatar

Stargazers

 avatar

Watchers

 avatar

screenshot's Issues

Take not in headless mode

It seems that when we create a persistent context folder in headed mode, we can't open it later in headless mode + when opening in headed mode to take screenshot, we are taken back to the open browser

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.