import re

import pandas as pd


class CheckAsinDetail(object):

    def __init__(self):
        self.df_asin_detail = pd.DataFrame()

    def check_asin(self, asin):
        if len(asin) != 10:
            return f"Error_asin_01: 长度异常--{asin}"
        elif not bool(re.match(r'^[a-zA-Z0-9]+$', asin)):
            return f"Error_asin_02: 包含非数字或者字母异常--{asin}"

    def check_price(self, price):
        pass


    def run(self):
        self.check_asin()
        self.check_price()
