This sample will make a request to the Alexa Top Sites web service using your Access Key ID and Secret Access Key.
Requirements:
- Python v2.7.3
- Requests: HTTP for Humans →
- lxml: XML and HTML with Python →
Steps:
- Sign up for an Amazon Web Services →
- Get your
Access Key ID
andSecret Access Key
- Sign up for Alexa Top Sites →
- Install all requirements using
pip
- Run
topsites.py
Installation and Usage:
$ pip install -r requirements.txt
$ python topsites.py ACCESS_KEY_ID SECRET_ACCESS_KEY [COUNTRY_CODE]
If you are getting "Not Authorized" messages, you probably have one of the following problems:
- Your access key or secret key were not entered properly.
- You did not sign up for Alexa Top Sites
- Your credit card was not valid.