scrape ASIN from amazon URL using javascript

前端 未结 16 718
旧巷少年郎
旧巷少年郎 2021-01-30 11:42

Assuming I have an Amazon product URL like so

http://www.amazon.com/Kindle-Wireless-Reading-Display-Generation/dp/B0015T963C/ref=amb_link_86123711_2?pf_rd_m=ATVP         


        
16条回答
  •  盖世英雄少女心
    2021-01-30 12:36

    The Wikipedia article on ASIN (which I've linkified in your question) gives the various forms of Amazon URLs. You can fairly easily create a regular expression (or series of them) to fetch this data using the match() method.

提交回复
热议问题