https://github.com/yu-iskw/capture-webscreens
Capture full web page screens with selenium in python
https://github.com/yu-iskw/capture-webscreens
python selenium
Last synced: about 1 month ago
JSON representation
Capture full web page screens with selenium in python
- Host: GitHub
- URL: https://github.com/yu-iskw/capture-webscreens
- Owner: yu-iskw
- Created: 2017-11-09T21:38:19.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-09T23:50:38.000Z (over 8 years ago)
- Last Synced: 2025-08-11T22:39:43.259Z (11 months ago)
- Topics: python, selenium
- Language: Python
- Size: 4.35 MB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Capture webscreen
This is a tool to capture full page pages with selenium in python.
You just have to prepare for a file of URL list and execute this tool.
A captured file name is same as the line number of a given URL list.
## Requirements
- Google Chrome
- Chrome Driver
- Python 3+
## How to Use
- `--driver`: Selenium driver. Supporting `chromedriver` and `pahtomjs` now.
- `--input`: Path to a file of URL list
- `--output`: Path to a directory to store captured images
```
# Run on ChromeDriver
python capture_screens.py \
--driver chromedriver \
--input test-urls.txt \
--output ./capture-images/
# Run on Phantom JS
python capture_screens.py \
--driver phantomjs \
--input test-urls.txt \
--output ./capture-images/
```
## How Setup
### Install Python libraries
```
pip install -r requirements.txt
```
### Install Chrome Driver
If you are using mac, you should install
- [Homebrew](https://brew.sh/)
- [Homebrew/homebrew\-services](https://github.com/Homebrew/homebrew-services)
```
# Install chrome-driver
brew install chromedriver
# Start chrome-driver
brew services start chromedriver
```
## Install PhantomJS
```
brew install phantomjs
```
# See Also
- [Website screenshot generator with Python – Ronny Yabar – Medium](https://medium.com/@ronnyml/website-screenshot-generator-with-python-593d6ddb56cb)