本文介绍了确定10位数字字符串是否有效的Amazon ASIN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个10位数字的字符串传递给我,我想在执行更多处理和/或重定向之前确认它是有效的ASIN。

I have a 10 digit string being passed to me, and I want to verify that it is a valid ASIN before doing more processing and/or redirection.

I知道非ISBN ASIN将始终为非数字且长度为10个字符

I know that a non ISBN ASIN will always be non-numeric and 10 characters in length

我只是想知道所传递的项目是否为有效的ASIN或

I just want to be able to tell if the item being passed is a valid ASIN or is it just a search string after I have already eliminated that it could be a ISBN.

例如, SOUNDBOARD是一个搜索词,而 B000J5XS3C是一个ASIN,

For example "SOUNDBOARD" is a search term while "B000J5XS3C" is an ASIN and "1412775884" is an ISBN.

是否有一种轻巧的方式来检查ASIN?

Is there a lightweight way to check ASIN?

推荐答案

您是否知道Amazon提供了API(包括Amazon Associates Web Service),您可以通过该API与Amazon进行编程交互。我怀疑这会(以某种方式)解决您的问题。请访问主页以获取更多信息。

Did you know that Amazon offers an API, including an Amazon Associates Web Service, that allows you to interactive programatically with Amazon. I suspect that will solve your problem (in some fashion). Check out the Amazon Web Services home page for more info.

这篇关于确定10位数字字符串是否有效的Amazon ASIN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 02:08