Skip to content

Instantly share code, notes, and snippets.

@sasasin
Last active June 27, 2022 18:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sasasin/ae951d006b3284b9621804ad722691fa to your computer and use it in GitHub Desktop.
Save sasasin/ae951d006b3284b9621804ad722691fa to your computer and use it in GitHub Desktop.
OwnershipData をリクエストするcurlコマンドラインを加工して、ASINだけ抽出する
#!/bin/bash
# https://www.amazon.co.jp/hz/mycd/myx#/home/content/booksAll/dateDsc/
# OwnershipData をリクエストするcurlコマンドラインを加工して、ASINだけ抽出する
# curlコマンドラインは、ブラウザの開発コンソール的なやつで「cURLコマンドの取得」みたいなので
pbpaste \
| sed -e 's/batchSize%22%3A18/batchSize%22%3A100/g' \
| bash \
| jq -r '.OwnershipData.items[] | .asin' \
| pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment