https://github.com/knlnks/amazon-wrapper
Playing around with go.
https://github.com/knlnks/amazon-wrapper
gin go golang goquery
Last synced: 3 months ago
JSON representation
Playing around with go.
- Host: GitHub
- URL: https://github.com/knlnks/amazon-wrapper
- Owner: KnlnKS
- Created: 2021-05-23T02:52:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-27T02:45:06.000Z (over 4 years ago)
- Last Synced: 2025-02-28T13:29:58.544Z (7 months ago)
- Topics: gin, go, golang, goquery
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Amazon Wrapper API
## Description
Go api that scrapes Amazon product urls.
Plz don't hate I'm just trying to learn Go.## Run Locally
1. `cd` into directoy.
2. Run `go run main.go`.Congrats! API will be running on port `8080` by default.
## How To Use
From an Amazon url extract the following variables:
`https://www.amazon.ca/${item}/dp/${variant}`
and create a url like:
`http://localhost:8080/item/${item}/${variant}`## Example
[This](https://www.amazon.ca/Mattel-GAMES-W2085-Card-Game/dp/B00CTH0A1Q) Amazon product page is [this](http://localhost:8080/item/Mattel-GAMES-W2085-Card-Game/B00CTH0A1Q) on the API. It returns the following:
```
{
"hiResLandingImage": "https://images-na.ssl-images-amazon.com/images/I/71Jzj%2BN%2BpmS._AC_SL1500_.jpg",
"landingImage": "https://images-na.ssl-images-amazon.com/images/I/71Jzj%2BN%2BpmS.__AC_SX300_SY300_QL70_ML2_.jpg",
"numReviews": "5,231 ratings",
"price": "$6.93",
"productTitle": "UNO Card Game",
"rating": "4.8 out of 5 stars",
"url": "https://www.amazon.ca/Mattel-GAMES-W2085-Card-Game/dp/B00CTH0A1Q"
}```