使用步骤
以小米有品网站的吹风机商品为例:https://www.xiaomiyoupin.com/detail?gid=151479&spmref=YouPinPC.$Home$.list.0.20408982
我们只想要这串id,可以用split分割
url = 'https://www.xiaomiyoupin.com/detail?gid=151479&spmref=YouPinPC.$Home$.list.0.20408982'
goods_id = url.split('&')[0].split('=')[-1].strip()