https://github.com/yukihirai0505/python-selenium-sample
This is python selenium sample project
https://github.com/yukihirai0505/python-selenium-sample
python python-selenium-sample selenium webkit2png
Last synced: about 1 month ago
JSON representation
This is python selenium sample project
- Host: GitHub
- URL: https://github.com/yukihirai0505/python-selenium-sample
- Owner: yukihirai0505
- Created: 2017-04-24T02:58:51.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-24T08:06:34.000Z (about 9 years ago)
- Last Synced: 2025-10-10T12:15:57.619Z (9 months ago)
- Topics: python, python-selenium-sample, selenium, webkit2png
- Language: Python
- Size: 4.53 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Get Started
python 3.5.3
install requirements
`pip install -r example/requirements.txt`
execute this example python file
`python example/scraping.py`
## scraping.py
Root directory scraping.py uses `webkit2png`.
So it needs to webkit2png command.
`brew install webkit2png`
## About webkit2png
In my case, webkit2png command doesn't work.
I got this error.
```
Python[16938:2657011] App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
... something went wrong: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
```
So I tried this one.
[https://github.com/bendalton/webkit2png/commit/9a96ac8977c386a84edb674ca1518e90452cee88](https://github.com/bendalton/webkit2png/commit/9a96ac8977c386a84edb674ca1518e90452cee88)
from: [http://stackoverflow.com/questions/32916052/python-app-transport-security-error-under-el-capitan](http://stackoverflow.com/questions/32916052/python-app-transport-security-error-under-el-capitan)
`/usr/local/Cellar/webkit2png/0.7/bin/webkit2png`
Around line 420
```
+ # Handles ATS HTTPS requirement introduced in El Cap
+ if options.ignore_ssl_check:
+ AppKit.NSBundle.mainBundle().infoDictionary()['NSAppTransportSecurity'] = dict(NSAllowsArbitraryLoads = True)
```
Then it works
`webkit2png --ignore-ssl-check [options] [http://example/]`