ruby - get the ASIN number from amazon URL -
given amazon product url, can either
http://amazon.com/gp/product/asin/* http://amazon.com/*/dp/asin/* http://amazon.com/dp/asin/* how scrap asin number url in ruby ? not @ writing regular expressions.
use should find match by:
scan(/https?:\/\/(?:www\.|)amazon\.com\/(?:gp\/product|[^\/]+\/dp|dp)\/([^\/]+)/)
Comments
Post a Comment