{"repo":"twtrubiks/google_play_store_spider","free":true,"listed":false,"github":"https://github.com/twtrubiks/google_play_store_spider","clone":"git clone https://github.com/twtrubiks/google_play_store_spider.git","description":"抓取 google play store 資料 use Scrapy on python","language":"Python","stars":15,"topics":["scrapy","googleplay","python","spider","json","database"],"license":null,"category":"databases-storage","readme_excerpt":"google play store spider 抓取 google play store 資料 use Scrapy on python Demo Video - Linux 特色 抓取 google play store 資料 輸出格式 JSON and DATABASE 使用方法 在路徑底下任何一個資料夾輸入 執行過程 輸出畫面 輸出檔案會儲存在 output/ 目錄下： - output/googleplay.json - JSON 格式的爬取資料 - output/googleplay.db - SQLite 資料庫檔案 googleplay.json googleplay.db 可以輸入SQLITE指令，搜尋指定的項目 執行環境 Python 3.13 Scrapy 2.13.3 技術說明 ItemAdapter 的使用 本專案使用 Scrapy 2.0+ 引入的 ItemAdapter 來處理資料項目。 ItemAdapter 提供統一的介面來處理不同類型的 items，讓程式碼更靈活。 在 pipelines.py 中的使用範例： 資料處理流程 ItemAdapter 重點特性 - 自動識別欄位 ：自動讀取 GooglePlaySpiderItem 類別中定義的所有 scrapy.Field() - 欄位順序注意 ： field names() 返回的是字母排序，需要固定順序以確保資料庫正確對應 - 動態處理 ：在 items.py 新增或刪除欄位時，ItemAdapter 會自動適應，不需修改 Pipeline 程式碼 - 型別無關 ：不只能處理 Scrapy Item，也能處理普通字典、dataclass 等多種資料型別 ItemAdapter 是 Scrapy 的依賴套件，會隨 Scrapy 自動安裝，無需額外安裝。 注意事項與限制 動態內容限制 Google Play Store 使用大量 JavaScript 動態載入內容 目前的爬蟲只能抓取初始載入的靜態內容（約 50-100 個應用程式） 無法自動載入「顯示更多」後的內容 解決方案 如需抓取更多資料，可考慮以下方案： 使用 Scrapy-Playwright 來執行 JavaScrip t 分析並直接呼叫 Google Play 的 API endpoints 調整爬取策略，從不同分類頁面收集資料 爬取速度設定 專案已優化爬取速度設定（見 settings.py ）： DOWNLOAD DELAY = 0.2 - 請求間隔 0.2 秒 CONCURRENT REQUESTS = 16 - 並發請求數 啟用 AutoThrottle 自動調節速度 請根據實際需求調整這些參數，避免對伺服器造成過大負擔。 License MIT license","default_branch":null,"files":null,"tree":[],"storefront":"/r/twtrubiks","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/twtrubiks/google_play_store_spider/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}