🏠 软件概述

美团商品抓取工具是一款专业的电商数据采集软件,专门用于抓取美团平台的商品信息。软件集成了多种功能模块,支持单个商品抓取、店铺批量抓取、数据解析和导出等功能。

🌟 主要功能特色

🛍️ 单个商品抓取

支持抓取单个商品的详细信息,包括商品名称、价格、规格、图片等完整数据。

🏪 店铺批量抓取

支持批量抓取整个店铺的商品信息,可指定分类进行精准抓取。

📊 数据解析

智能解析抓取到的数据,支持多种数据格式。

🖼️ 图片下载

支持下载商品图片,支持多种命名方式,便于后续使用。

📋 数据导出

支持导出为Excel格式,包含完整的商品信息。

🔄 数据去重

智能去重功能,避免重复数据,提高数据质量。

💡 温馨提示:本软件仅供学习和研究使用,请遵守相关法律法规和平台使用条款。

⚙️ 安装与启动

系统要求

  • 操作系统:Windows 10 或更高版本
  • 内存:至少 4GB RAM
  • 硬盘空间:至少 500MB 可用空间
  • 网络:稳定的互联网连接

安装步骤

1下载exe软件和Fiddler压缩包
2移动和解压到任意目录,然后将exe软件重命名为:美团商品抓取工具
3双击运行“Fiddler.exe”,如弹窗提示点击always allows和no。如图所示根据步骤打开https解析功能,然后一直点击是或者YES
Fiddler HTTPS设置步骤1 Fiddler HTTPS设置步骤2
4回到Fiddler主界面,右侧面板点击"FiddlerScript"区块
Fiddler脚本界面
5将下面的代码覆盖掉原有的代码,点击"Save Script"按钮保存脚本
Fiddler脚本代码
import System; import System.IO; import System.Windows.Forms; import Fiddler; class Handlers { public static RulesOption("Hide 304s") BindPref("fiddlerscript.rules.Hide304s") var m_Hide304s: boolean = false; // Cause Fiddler Classic to override the Accept-Language header with one of the defined values public static RulesOption("Request &Japanese Content") var m_Japanese: boolean = false; // Automatic Authentication public static RulesOption("&Automatically Authenticate") BindPref("fiddlerscript.rules.AutoAuth") var m_AutoAuth: boolean = false; // Cause Fiddler Classic to override the User-Agent header with one of the defined values // The page http://browserscope2.org/browse?category=selectors&ua=Mobile%20Safari is a good place to find updated versions of these RulesString("&User-Agents", true) BindPref("fiddlerscript.ephemeral.UserAgentString") RulesStringValue(0,"Netscape &3", "Mozilla/3.0 (Win95; I)") RulesStringValue(1,"WinPhone8.1", "Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 520) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537") RulesStringValue(2,"&Safari5 (Win7)", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1") RulesStringValue(3,"Safari9 (Mac)", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11) AppleWebKit/601.1.56 (KHTML, like Gecko) Version/9.0 Safari/601.1.56") RulesStringValue(4,"iPad", "Mozilla/5.0 (iPad; CPU OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F5027d Safari/600.1.4") RulesStringValue(5,"iPhone6", "Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4") RulesStringValue(6,"IE &6 (XPSP2)", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)") RulesStringValue(7,"IE &7 (Vista)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1)") RulesStringValue(8,"IE 8 (Win2k3 x64)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; WOW64; Trident/4.0)") RulesStringValue(9,"IE &8 (Win7)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)") RulesStringValue(10,"IE 9 (Win7)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)") RulesStringValue(11,"IE 10 (Win8)", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)") RulesStringValue(12,"IE 11 (Surface2)", "Mozilla/5.0 (Windows NT 6.3; ARM; Trident/7.0; Touch; rv:11.0) like Gecko") RulesStringValue(13,"IE 11 (Win8.1)", "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko") RulesStringValue(14,"Edge (Win10)", "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.11082") RulesStringValue(15,"&Opera", "Opera/9.80 (Windows NT 6.2; WOW64) Presto/2.12.388 Version/12.17") RulesStringValue(16,"&Firefox 3.6", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100625 Firefox/3.6.7") RulesStringValue(17,"&Firefox 43", "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0") RulesStringValue(18,"&Firefox Phone", "Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0") RulesStringValue(19,"&Firefox (Mac)", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0") RulesStringValue(20,"Chrome (Win)", "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.48 Safari/537.36") RulesStringValue(21,"Chrome (Android)", "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5 Build/LMY48B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.78 Mobile Safari/537.36") RulesStringValue(22,"ChromeBook", "Mozilla/5.0 (X11; CrOS x86_64 6680.52.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.74 Safari/537.36") RulesStringValue(23,"GoogleBot Crawler", "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)") RulesStringValue(24,"Kindle Fire (Silk)", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.0.22.79_10013310) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true") RulesStringValue(25,"&Custom...", "%CUSTOM%") public static var sUA: String = null; // Cause Fiddler Classic to delay HTTP traffic to simulate typical 56k modem conditions public static RulesOption("Simulate &Modem Speeds", "Per&formance") var m_SimulateModem: boolean = false; // Removes HTTP-caching related headers and specifies "no-cache" on requests and responses public static RulesOption("&Disable Caching", "Per&formance") var m_DisableCaching: boolean = false; public static RulesOption("Cache Always &Fresh", "Per&formance") var m_AlwaysFresh: boolean = false; // Force a manual reload of the script file. Resets all // RulesOption variables to their defaults. public static ToolsAction("Reset Script") function DoManualReload() { FiddlerObject.ReloadScript(); } public static ContextAction("Decode Selected Sessions") function DoRemoveEncoding(oSessions: Session[]) { for (var x:int = 0; x < oSessions.Length; x++){ oSessions[x].utilDecodeRequest(); oSessions[x].utilDecodeResponse(); } UI.actUpdateInspector(true,true); } static function OnBeforeRequest(oSession: Session) { if ((null != gs_ReplaceToken) && (oSession.url.indexOf(gs_ReplaceToken)>-1)) { // Case sensitive oSession.url = oSession.url.Replace(gs_ReplaceToken, gs_ReplaceTokenWith); } if ((null != gs_OverridenHost) && (oSession.host.toLowerCase() == gs_OverridenHost)) { oSession["x-overridehost"] = gs_OverrideHostWith; } if ((null!=bpRequestURI) && oSession.uriContains(bpRequestURI)) { oSession["x-breakrequest"]="uri"; } if ((null!=bpMethod) && (oSession.HTTPMethodIs(bpMethod))) { oSession["x-breakrequest"]="method"; } if ((null!=uiBoldURI) && oSession.uriContains(uiBoldURI)) { oSession["ui-bold"]="QuickExec"; } if (m_SimulateModem) { // Delay sends by 300ms per KB uploaded. oSession["request-trickle-delay"] = "300"; // Delay receives by 150ms per KB downloaded. oSession["response-trickle-delay"] = "150"; } if (m_DisableCaching) { oSession.oRequest.headers.Remove("If-None-Match"); oSession.oRequest.headers.Remove("If-Modified-Since"); oSession.oRequest["Pragma"] = "no-cache"; } // User-Agent Overrides if (null != sUA) { oSession.oRequest["User-Agent"] = sUA; } if (m_Japanese) { oSession.oRequest["Accept-Language"] = "ja"; } if (m_AutoAuth) { oSession["X-AutoAuth"] = "(default)"; } if (m_AlwaysFresh && (oSession.oRequest.headers.Exists("If-Modified-Since") || oSession.oRequest.headers.Exists("If-None-Match"))) { oSession.utilCreateResponseAndBypassServer(); oSession.responseCode = 304; oSession["ui-backcolor"] = "Lavender"; } } static function OnPeekAtResponseHeaders(oSession: Session) { //FiddlerApplication.Log.LogFormat("Session {0}: Response header peek shows status is {1}", oSession.id, oSession.responseCode); if (m_DisableCaching) { oSession.oResponse.headers.Remove("Expires"); oSession.oResponse["Cache-Control"] = "no-cache"; } if ((bpStatus>0) && (oSession.responseCode == bpStatus)) { oSession["x-breakresponse"]="status"; oSession.bBufferResponse = true; } if ((null!=bpResponseURI) && oSession.uriContains(bpResponseURI)) { oSession["x-breakresponse"]="uri"; oSession.bBufferResponse = true; } } static function OnBeforeResponse(oSession: Session) { if (m_Hide304s && oSession.responseCode == 304) { oSession["ui-hide"] = "true"; } //抓取小程序单个美团商品信息 if (oSession.fullUrl.Contains("/wxapp/v2/poi/product/info") || oSession.fullUrl.Contains("/quickbuy/v2/poi/product/info") || oSession.fullUrl.Contains("/mtweapp/v2/poi/product/info") || oSession.fullUrl.Contains("/weapp/v7/poi/product/detail") || oSession.fullUrl.Contains("/storm/graphql/tile/query")) { oSession.utilDecodeResponse(); //消除保存的请求可能存在乱码的情况 var fso, file; fso = new ActiveXObject("Scripting.FileSystemObject"); //文件保存路径 var desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); var filePath = desktopPath + "\\DATA.json"; file = fso.OpenTextFile(filePath, 2, true, true); file.Write(oSession.GetResponseBodyAsString()); file.Close(); } //抓取美团店铺分类下的商品信息 if (oSession.fullUrl.Contains("/quickbuy/v1/poi") || oSession.fullUrl.Contains("/wxapp/v1/poi") || oSession.fullUrl.Contains("/mtweapp/v1/poi") || oSession.fullUrl.Contains("/weapp/shop/v1/poi") || oSession.fullUrl.Contains("/weapp/poi/food/render")) { oSession.utilDecodeResponse(); //消除保存的请求可能存在乱码的情况 var fso, file; fso = new ActiveXObject("Scripting.FileSystemObject"); //文件保存路径 var desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); if(!Directory.Exists(desktopPath + "\\DATA")) { Directory.CreateDirectory(desktopPath + "\\DATA"); } // 获取当前时间戳 var timestamp = new Date().getTime(); var filePath = desktopPath + "\\DATA\\" + timestamp + ".json"; if (oSession.GetResponseBodyAsString().Length > 1000) { file = fso.OpenTextFile(filePath, 8, true, true); file.Write(oSession.GetResponseBodyAsString()); file.Close(); } } } static function Main() { var today: Date = new Date(); FiddlerObject.StatusText = " CustomRules.js was loaded at: " + today; } // These static variables are used for simple breakpointing & other QuickExec rules BindPref("fiddlerscript.ephemeral.bpRequestURI") public static var bpRequestURI:String = null; BindPref("fiddlerscript.ephemeral.bpResponseURI") public static var bpResponseURI:String = null; BindPref("fiddlerscript.ephemeral.bpMethod") public static var bpMethod: String = null; static var bpStatus:int = -1; static var uiBoldURI: String = null; static var gs_ReplaceToken: String = null; static var gs_ReplaceTokenWith: String = null; static var gs_OverridenHost: String = null; static var gs_OverrideHostWith: String = null; // The OnExecAction function is called by either the QuickExec box in the Fiddler Classic window, // or by the ExecAction.exe command line utility. static function OnExecAction(sParams: String[]): Boolean { FiddlerObject.StatusText = "ExecAction: " + sParams[0]; var sAction = sParams[0].toLowerCase(); switch (sAction) { case "bold": if (sParams.Length<2) {uiBoldURI=null; FiddlerObject.StatusText="Bolding cleared"; return false;} uiBoldURI = sParams[1]; FiddlerObject.StatusText="Bolding requests for " + uiBoldURI; return true; case "bp": FiddlerObject.alert("bpu = breakpoint request for uri\nbpm = breakpoint request method\nbps=breakpoint response status\nbpafter = breakpoint response for URI"); return true; case "bps": if (sParams.Length<2) {bpStatus=-1; FiddlerObject.StatusText="Response Status breakpoint cleared"; return false;} bpStatus = parseInt(sParams[1]); FiddlerObject.StatusText="Response status breakpoint for " + sParams[1]; return true; case "bpv": case "bpm": if (sParams.Length<2) {bpMethod=null; FiddlerObject.StatusText="Request Method breakpoint cleared"; return false;} bpMethod = sParams[1].toUpperCase(); FiddlerObject.StatusText="Request Method breakpoint for " + bpMethod; return true; case "bpu": if (sParams.Length<2) {bpRequestURI=null; FiddlerObject.StatusText="RequestURI breakpoint cleared"; return false;} bpRequestURI = sParams[1]; FiddlerObject.StatusText="RequestURI breakpoint for "+sParams[1]; return true; case "bpa": case "bpafter": if (sParams.Length<2) {bpResponseURI=null; FiddlerObject.StatusText="ResponseURI breakpoint cleared"; return false;} bpResponseURI = sParams[1]; FiddlerObject.StatusText="ResponseURI breakpoint for "+sParams[1]; return true; case "overridehost": if (sParams.Length<3) {gs_OverridenHost=null; FiddlerObject.StatusText="Host Override cleared"; return false;} gs_OverridenHost = sParams[1].toLowerCase(); gs_OverrideHostWith = sParams[2]; FiddlerObject.StatusText="Connecting to [" + gs_OverrideHostWith + "] for requests to [" + gs_OverridenHost + "]"; return true; case "urlreplace": if (sParams.Length<3) {gs_ReplaceToken=null; FiddlerObject.StatusText="URL Replacement cleared"; return false;} gs_ReplaceToken = sParams[1]; gs_ReplaceTokenWith = sParams[2].Replace(" ", "%20"); // Simple helper FiddlerObject.StatusText="Replacing [" + gs_ReplaceToken + "] in URIs with [" + gs_ReplaceTokenWith + "]"; return true; case "allbut": case "keeponly": if (sParams.Length<2) { FiddlerObject.StatusText="Please specify Content-Type to retain during wipe."; return false;} UI.actSelectSessionsWithResponseHeaderValue("Content-Type", sParams[1]); UI.actRemoveUnselectedSessions(); UI.lvSessions.SelectedItems.Clear(); FiddlerObject.StatusText="Removed all but Content-Type: " + sParams[1]; return true; case "stop": UI.actDetachProxy(); return true; case "start": UI.actAttachProxy(); return true; case "cls": case "clear": UI.actRemoveAllSessions(); return true; case "g": case "go": UI.actResumeAllSessions(); return true; case "goto": if (sParams.Length != 2) return false; Utilities.LaunchHyperlink("http://www.google.com/search?hl=en&btnI=I%27m+Feeling+Lucky&q=" + Utilities.UrlEncode(sParams[1])); return true; case "help": Utilities.LaunchHyperlink("http://fiddler2.com/r/?quickexec"); return true; case "hide": UI.actMinimizeToTray(); return true; case "log": FiddlerApplication.Log.LogString((sParams.Length<2) ? "User couldn't think of anything to say..." : sParams[1]); return true; case "nuke": UI.actClearWinINETCache(); UI.actClearWinINETCookies(); return true; case "screenshot": UI.actCaptureScreenshot(false); return true; case "show": UI.actRestoreWindow(); return true; case "tail": if (sParams.Length<2) { FiddlerObject.StatusText="Please specify # of sessions to trim the session list to."; return false;} UI.TrimSessionList(int.Parse(sParams[1])); return true; case "quit": UI.actExit(); return true; case "dump": UI.actSelectAll(); UI.actSaveSessionsToZip(CONFIG.GetPath("Captures") + "dump.saz"); UI.actRemoveAllSessions(); FiddlerObject.StatusText = "Dumped all sessions to " + CONFIG.GetPath("Captures") + "dump.saz"; return true; default: if (sAction.StartsWith("http") || sAction.StartsWith("www.")) { System.Diagnostics.Process.Start(sParams[0]); return true; } else { FiddlerObject.StatusText = "Requested ExecAction: '" + sAction + "' not found. Type HELP to learn more."; return false; } } } }
Fiddler保存脚本
6双击运行"美团商品抓取工具.exe",打开会比较慢,请耐心等待
7每次运行会进行许可证验证
⚠️ 注意事项:
  • 首次运行可能被杀毒软件误报,请添加到白名单
  • 确保网络连接正常,软件需要联网验证许可证和下载OCR模型
  • 建议关闭其他占用内存较大的程序
  • 请先确保软件能够正常打开,试用结束后,在主页选择合适套餐购买,一旦售出不支持退款

🔑 许可证管理

试用版使用

软件提供3次免费试用机会,试用可以体验部分功能。

购买正式版

试用满意后,可以购买许可证使用全部功能。

激活许可证

1在许可证管理页面输入许可证密钥
2点击"激活许可证"
3激活成功后即可使用全部功能
ℹ️ 许可证说明:
  • 许可证与硬件绑定,更换电脑需要重新购买
  • 许可证密钥请妥善保管,丢失无法找回
  • 支持在许可证管理页面查看激活状态

🛍️ 单个商品抓取

单个商品抓取功能允许您精确抓取特定商品的详细信息,适合需要获取单个商品完整数据的场景。

操作步骤

1打开Fiddler软件
2打开美团小程序店铺,点击单个商品进到商品详情页
3软件会实时自动刷新和解析商品信息,并且支持点击复制商品信息和图片预览
4解析完成后,商品信息会显示在界面上,图片会自动下载桌面“美团商品图片”对应商品名文件夹里

🏪 店铺批量抓取

店铺批量抓取功能可以批量自动抓取店铺的商品信息,支持指定分类抓取,大大提高工作效率。

操作步骤

批量抓取需要选择美团小程序窗口和店铺对应模式,然后进行自动化操作。

1打开Fiddler软件。
2打开美团小程序目标店铺
3在"窗口选择"区域中选择美团小程序
4(可选)在"指定分类"区域中输入分类,每行一个分类,支持多个分类,留空表示抓取所有分类
5在"抓取模式选择"区域中选择店铺对应的模式
6在"OCR控制"区域中点击“开始OCR监控”按钮
7在"状态信息"区域中实时查看抓取进度和日志,美团小程序界面在进行滚动时才是正常抓取状态,否则就是有问题的
8"OCR控制"区域中可以点击"停止抓取"按钮
9如中途点击停止抓取/更换账号/验证账号,已抓取的数据会保留,重新按照上面的步骤再次运行,不会重复操作,会继续进行后续的数据抓取
10整个流程走完后,会弹窗提示已抓取完成,最后需要配合数据解析功能进行数据解析和导出
店铺批量抓取界面

抓取阶段说明

  • 阶段一:确保能够正常进行OCR监控
  • 阶段二:滚动扫描店铺分类结构
  • 阶段三:滚动遍历各个分类页面
  • 阶段四:实时检测账号异常并提示用户修复
💡 抓取效率提示:
  • 关闭自动休眠和屏保
  • 点击开始按钮之前请确保没有其它东西遮挡美团小程序
  • 抓取过程中不要操作鼠标和键盘
  • 确保网络连接稳定
  • 大型店铺抓取可能需要较长时间
  • 建议在网络较好的时段进行抓取

📊 数据解析

数据解析功能可以读取桌面DATA文件夹中的原始数据,将其转换为结构化的表格格式,便于查看和导出。

操作步骤

1在"解析控制"区域中选择图片命名方式以及是否下载主图
2点击"开始解析数据"按钮
3将自动识别和去重数据并展示在"解析结果"区域中
4"解析结果"区域数据支持进行列拖动排序和点击单元格复制数据
5点击"导出表格数据"按钮,商品主图会自动下载到桌面"商品主图"文件夹中
数据解析界面

数据清洗

解析过程中,软件会自动处理以下内容:

  • 移除无效和重复数据
  • 智能根据起购数计算活动价
  • 统一数据结构
  • 多规格商品展开为多条记录
  • 多规格商品月销数据只展示在第一个规格上,表示该商品的月销量

❓ 常见问题

许可证相关问题

Q: 提示网络连接错误怎么办?

请检查以下几点:
  • 确保网络连接正常
  • 检查防火墙设置
  • 尝试更换网络环境

Q: 许可证激活失败怎么办?

可能的原因和解决方法:
  • 检查许可证密钥是否正确
  • 检查系统时间是否正确
  • 许可证与硬件绑定,更换电脑需要重新购买

抓取相关问题

Q: 无法找到目标窗口怎么办?

请尝试以下解决方法:
  • 确保美团小程序已完全加载
  • 点击"刷新窗口列表"按钮
  • 重新打开美团小程序

数据处理问题

Q: 抓取的数据多余或不完整怎么办?

可能的原因和解决方法:
  • 每次进行抓取前,需要先打开Fiddler,确保它处于抓取状态
  • 每次运行批量抓取功能前,需要重新进入美团小程序店铺,使其到正常的店铺首页即可
  • 数据结构变化,联系技术支持更新

Q: 图片下载失败怎么办?

可能的解决方法:
  • 检查网络连接
  • 确保有足够的磁盘空间
  • 重试操作

性能相关问题

Q: 软件崩溃怎么办?

处理步骤:
  • 查看日志文件了解错误原因
  • 重启软件
  • 检查系统兼容性
  • 联系技术支持

账号相关问题

Q: 账号被限流后该怎么办?

可能的解决方法:
  • 联系美团客服解除限制
  • 更换账号
  • 分批抓取数据
  • 更换IP网络
✅ 最佳实践总结:
  • 合理规划抓取任务,避免过度使用
  • 注意数据质量,及时验证结果
  • 保持软件更新,获得最佳体验
  • 遵守使用规范,合法合规使用
💡 温馨提示:如果在使用过程中遇到任何问题,请及时邮箱联系技术支持。我们会持续优化软件功能,为您提供更好的使用体验。