Duolingo Extractor v3.9

Capture Duolingo sentences, export XLSX with dynamic unit title, DeepL/Google links, session counting, draggable UI, auto-clear, and manual update

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
vic1175
今日安裝
0
安裝總數
6
評價
0 0 0
版本
3.9
建立日期
2025-11-07
更新日期
2025-11-07
尺寸
9.8 KB
授權條款
MIT
腳本執行於

# 🦉 Duolingo Extractor v3.9+

A lightweight Tampermonkey userscript that **captures Duolingo lesson data** — including sentences, translations, and dynamically updated unit titles — and **exports them into an XLSX file**.

Perfect for linguists, data nerds, or anyone obsessed with analyzing language progress.

---

## ✨ Features

- 🧠 **Dynamic Sentence Capture:** Automatically logs sentences during lessons
- 🗂️ **Unit Title Tracking:** Detects and names each set by unit/section
- 🧭 **Language Auto-Detection:** Adapts across multiple Duolingo courses
- 🧾 **One-Click XLSX Export:** Generates clean, sortable Excel output
- 🧱 **MutationObserver + Polling:** Keeps grabbing data even when DOM is lazy-loaded
- 💾 **Persistent State:** Remembers the last known unit name if the header disappears
- 🧰 **UI Overlay:** Draggable interface with export, clear, and counter buttons

---

## 🧩 Installation

1. Install [Tampermonkey](https://www.tampermonkey.net/) in your browser.
2. Click [**Install Script**](./duolingo-extractor.user.js) or manually copy it.
3. Visit [Duolingo](https://www.duolingo.com/) and start a lesson — the extractor UI should appear.
4. Use the **“Export XLSX”** button to download your data.

---

## ⚙️ Configuration

| Option | Description |
|--------|-------------|
| `Unit Title Mode` | Auto-detect or fallback to previously stored unit name |
| `Language` | Detected from Duolingo’s current course (flag icons header) |
| `Auto Export` | Off by default – can be enabled in code for power users |

---

## 💡 How It Works

- Watches the Duolingo web app with a **MutationObserver**
- Tracks updates to the banner element containing unit names (`.PsNCe` class)
- Stores the last known valid unit name in case it disappears
- Collects all displayed sentences and exports them in structured form

---

## 🪪 License

MIT License

Copyright (c) 2025 VIC
...


Released under the **MIT License**.
Free to use, modify, and share — attribution appreciated.

---

## 🧠 Credits

Made by **VIC** 🧩 — the designer, coder, and language tamer.
Inspired by curiosity and a stubborn refusal to accept “no API for that.”