NISHIO Hirokazu[Translate]
✅ASINで書影画像をダウンロード
python
def download_amazon_image(asin): url = f"http://images-jp.amazon.com/images/P/{asin}.09.LZZZZZZZ.jpg" local_filename = f"image_cache/{asin}.jpg" if os.path.isfile(local_filename): return with requests.get(url, stream=True) as r: r.raise_for_status() with open(local_filename, 'wb') as f: for chunk in r.iter_content(chunk_size=8192): # If you have chunk encoded response uncomment if # and set chunk_size parameter to None. #if chunk: f.write(chunk)


"Engineer's way of creating knowledge" the English version of my book is now available on [Engineer's way of creating knowledge]

(C)NISHIO Hirokazu / Converted from [Scrapbox] at [Edit]