Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phette23/selenium-usage-statistics
Automate retrieving library e-resource usage reports with Selenium
https://github.com/phette23/selenium-usage-statistics
Last synced: 27 days ago
JSON representation
Automate retrieving library e-resource usage reports with Selenium
- Host: GitHub
- URL: https://github.com/phette23/selenium-usage-statistics
- Owner: phette23
- Created: 2013-10-07T19:27:39.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-04-07T19:55:50.000Z (over 10 years ago)
- Last Synced: 2024-04-14T23:15:25.329Z (7 months ago)
- Language: Python
- Size: 1.03 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.mdown
Awesome Lists containing this project
README
# Automatic E-Resource Statistics
Uses [Selenium](http://selenium-python.readthedocs.org/en/latest/) to script opening four common library vendor usage statistic sites in a browser, signing in, and running COUNTER JR 1 reports. See it in action:
![script in action](https://raw.github.com/phette23/selenium-usage-statistics/master/in-action.gif)
## Getting Started
- Have Python 2.7 installed
- Install [the Selenium IDE add-on](http://www.seleniumhq.org/projects/ide/) for Firefox
- `pip install -r requirements.txt`, if you don't have pip already then `easy_install pip` first
- Copy example.json to logins.json & fill in your EBSCO, ProQuest, Gale admin credentials
- Run jr1-stats.py, e.g. by running `python jr1-stats.py` from within the project's directoryIf you get a "No such file or directory" error (see error.txt for example), you may have your Firefox binary in an unexpected location. For instance, I installed Firefox on a Mac with [homebrew cask](https://github.com/phinze/homebrew-cask) which puts Firefox.app my user's Applications folder, not the root Applications folder. If you run into the same problem on a Mac, symlinking Firefox.app into /Applications can fix it. Open Terminal.app (in Utilities) and run:
```bash
cd /Applications && ln -s ~/Applications/Firefox.app
```where "~/Applications/Firefox.app" is wherever your non-standard location for Firefox is.
Hat-tip to [this StackOverflow thread](http://stackoverflow.com/questions/8334706/selenium-and-python-on-snow-leopard) for diagnosing that issue.
## To Do
This is mostly a proof-of-concept script at this point. Eventually it would be nice to make it easier to add additional vendors, for instance with a get_vendor class which EBSCO, ProQuest, etc. are all instances of. It'd also be nice to be able to specify time ranges or report types but that's a challenge given variability of vendor interfaces.