https://github.com/pybites/form-automation-fun
Using Requests and Selenium to automate PyBites Banner Generator app login and banner form submission/ creation
https://github.com/pybites/form-automation-fun
Last synced: about 2 months ago
JSON representation
Using Requests and Selenium to automate PyBites Banner Generator app login and banner form submission/ creation
- Host: GitHub
- URL: https://github.com/pybites/form-automation-fun
- Owner: pybites
- Created: 2017-08-19T22:17:44.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T00:43:51.000Z (over 2 years ago)
- Last Synced: 2025-03-22T17:11:29.587Z (2 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## PyBites Banner Generator Automation
Code for PyBites article [Fully Automate Login and Banner Generation with Selenium, Requests and Click](https://pybit.es/selenium-requests-automation.html).
### Background
After writing [Making a Banner Generator With Pillow and Flask](https://pybit.es/pillow-banner-flask.html) I felt like automating the process even more.
So I wrote two scripts to use Requests and Selenium to automate [PyBites Banner Generator](https://pybites-banners.herokuapp.com/) app login and banner form submission/ creation.
Install requirements (might need to OS install PhantomJS) and run:
1. Public version:
$ python public_banner.py
This is an interactive script2. Private version (PyBites only for now - but feel free to clone the repo and deploy it to Heroku with your own logos):
$ export USERNAME=my_user
$ export PASSWORD=my_passwordI am using [the awesome click module](http://click.pocoo.org/5/) for the CLI interface:
$ python private_banner.py --help
Usage: private_banner.py [OPTIONS]Options:
-n, --name TEXT
-l, --logo [news|challenge|special|article]
-i, --image TEXT
-t, --text TEXT
-b, --background / -nb, --no-background
-o, --outfile TEXT
-u, --username TEXT
-p, --password TEXT
--help Show this message and exit.For example:
$ python private_banner.py -n mybanner \
-l special -i http://images.indianexpress.com/2015/05/python.jpg \
-t 'PyBites Banner Generator Automation' -b