Starting the Shell
Launch the interactive shell:Shell Options
Execute Code and Exit
Run a single command and exit:Set Log Level
Control logging verbosity:debug- Detailed debugging information (default)info- General informational messageswarning- Warning messages onlyerror- Error messages onlycritical- Critical errors onlyfatal- Fatal errors only
Usage Examples
Basic Command Execution
Custom Log Level
Interactive Mode
Features
The interactive shell provides:- REPL Environment - Test scraping commands in real-time
- Auto-completion - Tab completion for Scrapling objects
- History - Access previous commands
- Custom Logging - Configurable log levels
- Direct Execution - Run one-off commands with
-cflag
Shell Environment
When you start the shell, you have immediate access to:- All Scrapling fetchers (Fetcher, DynamicFetcher, StealthyFetcher)
- Response objects and their methods
- CSS selector operations
- Content extraction utilities
Best Practices
Use debug level for development
Use debug level for development
When exploring new websites, use
--loglevel debug to see detailed request/response information.Test selectors interactively
Test selectors interactively
Use the shell to test CSS selectors before implementing them in your scripts.
Quick prototyping
Quick prototyping
Use
-c flag for quick one-off scraping tasks without writing a full script.Related Commands
CLI Overview
View all available CLI commands
Extract Commands
Learn about content extraction