Git Product home page Git Product logo

gogoamazonwish's Introduction

GoGo Amazon Wish

A Go library to get items from an Amazon wishlist. Unofficial as Amazon shut down their wishlist API. This uses web scraping to get the items off a specified wishlist.

How to use

See the docs.

go get -u github.com/cheshire137/gogoamazonwish/pkg/amazon
import (
  "fmt"
  "log"

  "github.com/cheshire137/gogoamazonwish/pkg/amazon"
)

func main() {
  url := "https://www.amazon.com/hz/wishlist/ls/3I6EQPZ8OB1DT"
  wishlist, err := amazon.NewWishlist(url)
  if err != nil {
    log.Fatalln(err)
  }

  items, err := wishlist.Items()
  if err != nil {
    log.Fatalln(err)
  }

  fmt.Printf("Found %d item(s):\n\n", len(items))
  number := 1
  for _itemID, item := range items {
    fmt.Printf("%d) %s\n\n", number, item)
    number++
  }
}

How to develop

I built this with Go version 1.13.4. There's a command-line tool to test loading an Amazon wishlist that you can run via:

go run cmd/getwishlist/main.go URL to Amazon wishlist [proxy URL]...

You can specify optional proxy URLs to hit Amazon with. Might be useful if you're hitting errors about Amazon thinking the tool is a bot.

Sample use:

go run cmd/getwishlist/main.go "https://www.amazon.com/hz/wishlist/ls/3I6EQPZ8OB1DT"

To run tests: make

Thanks

gogoamazonwish's People

Contributors

cheshire137 avatar groovestomp avatar tim-dev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.