A Chrome extension that extracts URLs from website sitemaps, filters them by topic using LLM, and inserts selected links into NotebookLM.
- Sitemap Extraction: Automatically discover and extract URLs from website sitemaps
- Web Crawling: Alternative method to crawl websites and discover URLs by following links
- Manual URL Input: Paste URLs manually for processing
- LLM Topic Filtering: Use AI to filter URLs by relevance to specific topics
- NotebookLM Integration: Seamlessly insert filtered URLs into NotebookLM
- Auto-focus Assist: Optional feature to automatically focus the "Add sources" field in NotebookLM
-
Clone this repository:
git clone https://github.com/David-Hoa2023/notebooklm-extension.git
-
Open Chrome and navigate to
chrome://extensions/ -
Enable "Developer mode" in the top right corner
-
Click "Load unpacked" and select the extension folder
-
The extension icon should appear in your Chrome toolbar
Option A: Sitemap Extraction
- Enter a website URL (e.g.,
https://example.com) - Click "Extract Links" to discover URLs from sitemaps
Option B: Web Crawling
- Enter a start URL
- Configure crawl depth (1-5 levels) and maximum pages
- Choose whether to stay within the same domain
- Click "Crawl Website"
Option C: Manual Input
- Paste URLs manually (one per line)
- Click "Load URLs"
- Enter a topic keyword (e.g., "AI ethics", "machine learning")
- Adjust the relevance threshold (0.0 - 1.0)
- Configure LLM settings:
- Provider: OpenAI or Generic JSON endpoint
- API endpoint and key
- Batch size and metadata limits
- Click "Filter" to process URLs with AI
- Review filtered URLs with relevance scores
- Select desired URLs using checkboxes
- Click "Insert into NotebookLM" to copy links and open NotebookLM
- Paste the links into the "Add sources" field
The extension supports multiple LLM providers:
OpenAI
- Endpoint:
https://api.openai.com/v1/chat/completions - Models:
gpt-4o-mini,gpt-4,gpt-3.5-turbo - API Key: Your OpenAI API key
Generic JSON Endpoint
- Custom endpoint that accepts
{topic, items}and returns[{url, match, score}] - Useful for self-hosted LLM services
Access the settings page by clicking the "Cài đặt" (Settings) button in the popup to configure:
- LLM endpoint and API key
- Batch processing size
- Metadata fetch limits
- NotebookLM notebook ID
notebooklm_extension/
├── manifest.json # Extension manifest
├── content/
│ └── notebooklm-assist.js # Content script for NotebookLM integration
├── icons/
│ ├── icon48.png # Extension icon (48px)
│ └── icon128.png # Extension icon (128px)
├── scr/
│ ├── lib/
│ │ ├── crawler.js # Web crawling functionality
│ │ ├── llmFilter.js # LLM topic filtering
│ │ └── sitemap.js # Sitemap extraction
│ ├── popup.html # Main popup interface
│ ├── popup.css # Popup styling
│ ├── popup.js # Popup logic
│ └── sw.js # Background service worker
├── options.html # Settings page
├── options.js # Settings page logic
└── README.md # This file
storage: Save user settings and preferencesactiveTab: Access current tab informationscripting: Inject content scriptsclipboardWrite: Copy URLs to clipboardhost_permissions: Access all websites and NotebookLM
- Manifest V3: Uses modern Chrome extension architecture
- Service Worker: Background processing for sitemap extraction and LLM filtering
- Content Script: Minimal integration with NotebookLM for auto-focus
- Popup Interface: Main user interface for the extension
The extension uses a flexible LLM integration system:
- Supports OpenAI's Chat Completions API
- Generic JSON endpoint support for custom LLM services
- Batch processing for efficiency
- Configurable concurrency and timeouts
- Chrome browser with developer mode enabled
- Basic understanding of Chrome extensions
No build process required - the extension runs directly from source files.
- Load the extension in Chrome developer mode
- Test sitemap extraction with various websites
- Verify LLM filtering with different topics
- Test NotebookLM integration
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source. Please check the repository for license details.
For issues and questions:
- Create an issue in the GitHub repository
- Check the extension's settings page for configuration help
- Ensure your LLM API credentials are correct
- Initial release
- Sitemap extraction functionality
- Web crawling alternative
- LLM topic filtering
- NotebookLM integration
- Auto-focus assist feature
- Settings page for configuration