スキップしてメイン コンテンツに移動

投稿

ラベル(zoom)が付いた投稿を表示しています

Get Original Hi-res image from Zoomable image on Amazon

Some pages in amazon provide images which user can zoom on, like this page. The question is "Where is the original hi-resolution image?". You can easily find the explanation page for how to construct url for original hi-res image. (See this stack overflow page .) In this post I will show you the code snippet for getting original hires imgae from ASIN code. Note!: This method might be unavailable if amazon change the implementation of zoom and hires image url construnction. Code Actually code is nothing special. Just find " DynAPI.addZoomViewer( " . // pattern for extracting image code used for retrieving original image. private static Pattern AMAZON_ZOOM_IMAGE_PATTERN = Pattern.compile("DynAPI\\.addZoomViewer\\(\".+/(.+?)\",\\s*(.+?),\\s*(.+?),\\s*(.+?),\\s*(.+?),\\s*(.+?),.*\\)"); public static String findOriginalZoomImageUrl(String asin, String country) { String url = getAmazonZoomImageWindowUrl(asin, country); try{