A tool for analyzing, categorizing, and reporting on URLs from browsing history or other sources
Project description
URL Analyzer
A powerful tool for analyzing, categorizing, and reporting on URLs from browsing history or other sources.
Overview
URL Analyzer helps you understand web browsing patterns, identify potentially sensitive websites, and generate comprehensive reports with visualizations. It provides powerful classification, analysis, and reporting capabilities for URL data.
Key Features
- URL Classification: Automatically categorize URLs using pattern matching and custom rules
- Batch Processing: Process multiple files with parallel execution for efficiency
- Live Scanning: Fetch additional information about uncategorized URLs
- Content Summarization: Generate AI-powered summaries of web page content
- Interactive Reports: Create rich HTML reports with charts, tables, and visualizations
- Multiple Report Templates: Choose from various templates for different use cases
- Data Export: Export analyzed data to CSV, JSON, or Excel formats
- Customizable Rules: Define custom classification rules for your specific needs
- Memory Optimization: Process large files efficiently with chunked processing
Installation
Requirements
- Python 3.8 or higher
- Required dependencies (installed automatically)
Installation Steps
From PyPI (Recommended)
Install the latest stable version from PyPI:
pip install hibber-url-analyzer
Optional Dependencies
For additional features, install optional dependencies:
# For all features
pip install hibber-url-analyzer[all]
# For specific features
pip install hibber-url-analyzer[url_fetching,html_parsing,visualization]
Available optional dependency groups:
url_fetching: For fetching URL contenthtml_parsing: For parsing HTML contentdomain_extraction: For advanced domain analysisvisualization: For enhanced charts and graphsgeolocation: For IP geolocation featurespdf_export: For PDF report generationprogress: For progress barsexcel: For Excel file supportterminal_ui: For rich terminal interfacesystem: For system monitoringml_analysis: For machine learning analysis featuresdev: For development tools
From Source
For development or latest features:
git clone https://github.com/yourusername/url-analyzer.git
cd url-analyzer
pip install -e .
Environment Variables (Optional)
Set up environment variables for enhanced features:
GEMINI_API_KEY: For content summarization featuresURL_ANALYZER_CONFIG_PATH: Custom path to configuration fileURL_ANALYZER_CACHE_PATH: Custom path to cache file
Quick Start
Analyzing a Single File
To analyze a CSV or Excel file containing URLs:
python -m url_analyzer analyze --path "path/to/file.csv"
This will:
- Process the file and classify URLs
- Generate an HTML report
- Open the report in your default web browser
Required File Format
Your input file should be a CSV or Excel file with at least one column named Domain_name containing the URLs to analyze. Additional columns that enhance the analysis include:
Client_Name: Name of the device or userMAC_address: MAC address of the deviceAccess_time: Timestamp of when the URL was accessed
Basic Command Options
The basic command can be enhanced with various options:
--live-scan: Fetch additional information about uncategorized URLs--summarize: Generate AI-powered summaries of web page content (requires--live-scan)--aggregate: Generate a single report for multiple files--output PATH: Specify output directory for reports--no-open: Don't automatically open the report in browser
Example with options:
python -m url_analyzer analyze --path "path/to/file.csv" --live-scan --summarize --output "reports"
Advanced Features
Batch Processing
To process multiple files at once:
python -m url_analyzer analyze --path "path/to/directory" --aggregate
This will process all CSV and Excel files in the directory and generate a single aggregated report.
Batch processing options:
--job-id ID: Assign a unique identifier to the batch job--max-workers N: Set maximum number of parallel workers (default: 20)--checkpoint-interval N: Minutes between saving checkpoints (default: 5)
Report Templates
URL Analyzer provides several built-in report templates for different use cases:
python -m url_analyzer templates
This will list all available templates with descriptions.
To use a specific template:
python -m url_analyzer analyze --path "path/to/file.csv" --template "template_name"
Available Templates
- Default: Comprehensive template with all report sections and visualizations
- Minimal: Simplified template with a clean, streamlined design
- Data Analytics: Data-focused template with additional metrics and insights
- Security Focus: Security-oriented template with security metrics and recommendations
- Executive Summary: High-level overview for executives with key metrics and insights
- Print Friendly: Optimized for printing with simplified layout and print-specific styling
Exporting Data
Export analyzed data to different formats:
python -m url_analyzer export --path "path/to/file.csv" --format json
Supported formats: csv, json, excel
Configuration
Configure the application settings:
python -m url_analyzer configure
This opens an interactive configuration interface where you can:
- View current settings
- Add or modify URL classification patterns
- Configure API settings
- Set scan parameters
Understanding the Report
The HTML report provides a comprehensive view of your URL data:
Dashboard Section
- Doughnut chart showing URL categories
- Statistics including total URLs, sensitive URLs, etc.
Domain & Time Insights
- Top 10 visited domains chart
- Traffic flow analysis (Sankey diagram)
- Activity heatmap by day and hour
- Daily URL access trend
Detailed URL Data
- Interactive table with all URLs
- Filtering by client name or MAC address
- Export options (CSV, JSON)
- Dark/light theme toggle
URL Classification
URLs are classified into several categories:
- Sensitive: URLs matching patterns for social media, adult content, etc.
- User-Generated: URLs containing user content patterns like profiles, forums, etc.
- Advertising: Ad-related domains and services
- Analytics: Tracking and analytics services
- CDN: Content delivery networks
- Corporate: Business and corporate sites
- Uncategorized: URLs that don't match any defined patterns
Custom URL Classification Rules
You can define custom classification rules in the configuration file (config.json):
{
"custom_rules": [
{
"pattern": "news\\.google\\.com",
"category": "News",
"priority": 120,
"is_sensitive": false,
"description": "Google News"
}
]
}
For more information on custom rules, see the Custom Rules Documentation.
Troubleshooting
Common Issues
-
Missing dependencies:
- Ensure you've installed all required dependencies with
pip install -r requirements.txt - For advanced features, make sure optional dependencies are installed
- Ensure you've installed all required dependencies with
-
File format issues:
- Verify your input file has a
Domain_namecolumn - Check for encoding issues in CSV files
- Verify your input file has a
-
Performance with large files:
- Use the
--max-workersoption to adjust parallel processing - Consider splitting very large files into smaller chunks
- Use the
-
API key issues:
- Set the
GEMINI_API_KEYenvironment variable for summarization features
- Set the
Getting Help
If you encounter issues not covered here:
- Check the logs for detailed error messages
- Consult the documentation
- Submit an issue on the project repository
Command Reference
Main Commands
analyze: Process files and generate reportsconfigure: Manage application configurationexport: Export data to different formatsreport: Generate reports from previously analyzed datatemplates: List available report templates
Global Options
--verbose,-v: Increase output verbosity--quiet,-q: Suppress non-error output--log-file PATH: Specify log file path
For a complete list of commands and options, run:
python -m url_analyzer --help
Documentation
- User Instructions: Detailed user guide
- Custom Rules: Guide to creating custom classification rules
- Batch Processing: Advanced batch processing options
- Configuration Guide: Detailed configuration options
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Thanks to all contributors who have helped improve this project
- Special thanks to the open-source libraries that made this project possible
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hibber_url_analyzer-1.0.0.tar.gz.
File metadata
- Download URL: hibber_url_analyzer-1.0.0.tar.gz
- Upload date:
- Size: 652.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d54ea5b292e517c927e18154bf14b0538dd36999a03c29c7b9d3f11782b83616
|
|
| MD5 |
ea62a8c91322ca33f7a07fda1de5c759
|
|
| BLAKE2b-256 |
78f3321d035421360dcb919df5022d974e3e671e326176066ee173b02f4d9306
|
File details
Details for the file hibber_url_analyzer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: hibber_url_analyzer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 798.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9aaba265cca91227174c518a9137d7fb99a7d37dbaffe24f9d014821633d0a06
|
|
| MD5 |
1ed900a084a3ea797b0dd65b0c4feb5d
|
|
| BLAKE2b-256 |
b950f69ccada3e6a30ca82b94f11ef49c19c2bf5efbc4d1e7c474c3cdf89d1eb
|