This skill enables you to leverage the full power of Google NotebookLM through the unofficial notebooklm-py Python library. It provides programmatic access to features that aren't available in the web UI, including batch operations, custom format exports, and advanced automation capabilities.
Use this skill when you need to:
First, ensure you have the notebooklm-py library installed:
pip install notebooklm-py
from notebooklm import NotebookLMClient
# Initialize client
client = NotebookLMClient()
# Create a new notebook
notebook = client.create_notebook("My Research Project")
# Add sources
notebook.add_source(url="https://example.com/research-paper.pdf")
notebook.add_source(youtube_url="https://youtube.com/watch?v=abc123")
notebook.add_source(file_path="./documents/report.txt")
# Ask questions
response = notebook.ask("What are the main findings in these sources?")
print(response.text)
# Generate audio overview
audio = notebook.generate_audio_overview(
format="deep-dive",
length="medium",
language="en"
)
audio.save("./outputs/podcast.mp3")
# Create notebook
notebooklm notebook create "My Research"
# Add sources
notebooklm notebook add-source "My Research" --url https://example.com/paper.pdf
notebooklm notebook add-source "My Research" --youtube https://youtube.com/watch?v=abc123
# Ask questions
notebooklm notebook ask "My Research" "Summarize the key points"
# Generate content
notebooklm notebook audio "My Research" --format deep-dive --length medium
notebooklm notebook video "My Research" --style cinematic
notebooklm notebook slide "My Research" --format detailed
# Download artifacts
notebooklm notebook download "My Research" --format mp3 --output ./podcasts/
# Run web research with auto-import
research_notebook = client.research_web(
query="latest developments in quantum computing",
max_sources=10,
mode="deep" # or "fast"
)
# Run Drive research
drive_notebook = client.research_drive(
folder_id="your-drive-folder-id",
query="machine learning papers"
)
# Import multiple sources at once
sources = [
{"type": "url", "value": "https://example1.com"},
{"type": "youtube", "value": "https://youtube.com/watch?v=..."},
{"type": "file", "value": "./document.pdf"}
]
notebook.add_sources(sources)
# Generate multiple content types
formats = ["mp3", "mp4", "pdf", "png"]
for fmt in formats:
notebook.download_artifacts(format=fmt, output_dir=f"./outputs/{fmt}")
# Set a custom persona for more focused responses
notebook.set_persona(
"You are a technical expert specializing in machine learning. "
"Provide detailed, accurate explanations with code examples when relevant."
)
To update this skill to the latest version from the GitHub repository, follow these steps:
```bash
git clone https://github.com/teng-lin/notebooklm-py.git
# or if you already have it:
cd notebooklm-py && git pull
```
```bash
pip install -e . # for development mode, or just pip install notebooklm-py
```
ai-agent-development - For building agents that utilize NotebookLM capabilitiesaudio-transcriber - For processing generated audio contentvideo-frames - For extracting frames from video overviewsapp-builder - For creating full applications around NotebookLM workflowsBet, Boss. This skill puts the full power of NotebookLM at your fingertips. What notebook shall we create first? 😉
共 1 个版本