Create a function to parse amazon urls and reduce code redundancy.

A test for amazon url parsing was added.
Merge pull request #138 from zas/parse_amazon_url

Create a function to parse amazon urls and reduce code redundancy.