影刀RPA 电商选品自动化:数据驱动找爆款
影刀RPA 电商选品自动化数据驱动找爆款作者林焱一、什么情况用影刀做选品电商选品是高度依赖数据的工作——哪些类目销量在涨哪些商品差评集中反映了什么需求竞争对手的销售趋势是什么选品人员每天需要在拼多多、淘宝、1688之间来回查数据没有系统化的数据采集全凭感觉和经验命中率低。影刀RPA可以帮你搭建一套自动化的选品数据管道每天自动采集各大平台热卖商品数据对比分析各平台同品价格和评价1688找货源对比货源质量和报价店群矩阵自动化突破运营极限二、实战一淘宝/拼多多热销商品采集场景每天早上7点自动运行采集指定类目的TOP100商品数据。采集淘宝热销排行# 采集淘宝某类目热销商品category_urlhttps://s.taobao.com/search?q手机支架sortsale-descyingdao.open_url(category_url)yingdao.wait_for_element(.items-list)products[]page1whilepage5:# 采集前5页itemsyingdao.find_elements(.item-card)foriteminitems:try:titleitem.find_element(.item-title).text priceitem.find_element(.price).text salesitem.find_element(.sales-count).text shopitem.find_element(.shop-name).text linkitem.find_element(a).get_attribute(href)products.append({商品名称:title[:50],价格元:price,月销量:sales,店铺名:shop,链接:link,采集日期:today,平台:淘宝})exceptException:continue# 下一页next_btnyingdao.find_element(.next-page)ifnotnext_btnordisabledinnext_btn.get_attribute(class):breaknext_btn.click()yingdao.wait_for_element(.items-list,timeout10)page1yingdao.wait(2)print(f淘宝采集完成{len(products)}条)合并多平台数据做对比# 读取今日和7天前的数据计算销量增速df_todaypd.DataFrame(products)df_7days_agopd.read_excel(fC:\\选品\\{seven_days_ago}_淘宝.xlsx)# 关联用商品标题做近似匹配因为链接可能变fromfuzzywuzzyimportfuzzdeffind_match(title,df_old):在历史数据中找最相近的商品best_score0best_rowNonefor_,rowindf_old.iterrows():scorefuzz.token_set_ratio(title,row[商品名称])ifscorebest_score:best_scorescore best_rowrowreturnbest_rowifbest_score70elseNonegrowth_data[]for_,rowindf_today.iterrows():oldfind_match(row[商品名称],df_7days_ago)ifoldisnotNone:today_salesint(row[月销量].replace(万,0000).replace(,))old_salesint(old[月销量].replace(万,0000).replace(,))growth(today_sales-old_sales)/(old_sales1)*100growth_data.append({**row.to_dict(),7日销量增速(%):round(growth,1)})# 按增速排序找黑马商品growth_dfpd.DataFrame(growth_data)rising_starsgrowth_df[growth_df[7日销量增速(%)]50].sort_values(7日销量增速(%),ascendingFalse)三、实战二1688找货源自动比价选好了品去1688找货源时要对比10家供应商的报价、MOQ、评分。defsearch_1688_suppliers(product_name,max_results20):在1688搜索供应商yingdao.open_url(fhttps://s.1688.com/selloffer/offer_search.htm?keywords{product_name})yingdao.wait_for_element(.offer-list)suppliers[]itemsyingdao.find_elements(.offer-item)[:max_results]foriteminitems:try:titleitem.find_element(.offer-title).text priceitem.find_element(.offer-price).text moqitem.find_element(.offer-moq).textifyingdao.element_exists(.offer-moq)else未知companyitem.find_element(.company-name).text ratingitem.find_element(.company-rating).textifyingdao.element_exists(.company-rating)else无locationitem.find_element(.company-location).textifyingdao.element_exists(.company-location)else未知suppliers.append({商品标题:title[:40],报价:price,最小起订量:moq,供应商:company,评分:rating,所在地:location})exceptException:continuereturnsuppliers# 对选品清单上的商品批量搜索货源selection_listpd.read_excel(选品清单.xlsx)all_suppliers[]for_,productinselection_list.iterrows():supplierssearch_1688_suppliers(product[核心关键词])forsinsuppliers:s[目标商品]product[商品名称]all_suppliers.extend(suppliers)yingdao.wait(2)pd.DataFrame(all_suppliers).to_excel(1688货源汇总.xlsx,indexFalse)temu店群自动化报活动案例四、踩坑记录坑1销量数据存在注水淘宝的销量数字可以是历史累计也可以是近30天不同店铺展示不同。采集时要标注数据口径不要直接比较绝对数字。坑2价格随时间变化商品在大促前后价格差异很大分析时要标注采集时间避免用大促期间数据做基准。坑31688搜索结果包含广告前几个结果往往是付费推广竞争激烈的类目广告比例超过50%。要标记是否为广告位或跳过前3条结果。坑4模糊匹配识别同款商品不准不同卖家对同一商品的描述差异极大“手机支架vs手机懒人支架桌面折叠”。纯文字匹配效果有限需要结合图片或主图Hash做辅助判断。适用人群电商选品师、跨境卖家、1688采购员难度⭐⭐⭐基础采集容易增速分析和去重需要技巧