Full website audit tool (broken links, SEO, PageSpeed)
Project description
webAudit
webAudit is an async Python library and CLI tool for website auditing, content extraction, SEO analysis, crawling, and PageSpeed Insights. It allows developers and website owners to quickly analyze websites for SEO, performance, and content quality.
Features
- Website Audit: Crawl a site and generate a comprehensive audit report (status codes, headings, meta tags, internal links, broken links, load time, and more).
- Content Extraction: Extract clean text from any page.
- SEO Analysis: Analyze title, meta description, H1 count, and images without alt attributes.
- Website Crawl: Crawl a site and list URLs with optional HTTP status check.
- PageSpeed Insights: Run Google PageSpeed API audits for performance, SEO, accessibility, and best practices.
- Test-All Command: Run all checks sequentially for quick testing.
Installation
From PyPI
pip install webAudit
Or from source
git clone https://github.com/amjadkhan345/Website_audit
cd Website_audit
pip install .
After installation, the CLI command
webAuditwill be available globally.
CLI Usage
1️⃣ Audit a Website
webAudit audit https://example.com --max-pages 20 --sitemap
--max-pages→ Maximum pages to crawl (default: 50)--sitemap→ Use sitemap URLs for crawling
Output: Progress bar and CSV report audit_report.csv.
2️⃣ Extract Page Content
webAudit extract https://example.com/page
Output: Clean extracted text.
3️⃣ SEO Analysis
webAudit seo https://example.com
Output Example:
{
"title": "Example Page",
"meta_description": "This is an example website",
"h1_count": 2,
"img_without_alt": 3
}
4️⃣ Crawl a Website
webAudit crawl https://example.com
Output: List of discovered URLs with optional HTTP status.
5️⃣ PageSpeed Insights
webAudit pagespeed https://example.com YOUR_API_KEY --strategy mobile
--strategy mobile|desktop→ Run PageSpeed for mobile or desktop (default: mobile)
Output Example:
{
"performance": 0.85,
"seo": 0.92,
"accessibility": 0.88,
"best_practices": 0.95
}
Class & Function-Based Usage
You can also use webAudit programmatically in your Python code.
1️⃣ Website Audit
import asyncio
from webAudit.auditor import WebsiteAuditor
async def audit_site():
auditor = WebsiteAuditor("https://example.com", max_pages=10, sitemap=True)
report = await auditor.run()
print(report)
asyncio.run(audit_site())
2️⃣ Content Extraction
import asyncio
from webAudit.extractor import ContentExtractor
async def extract_content():
extractor = ContentExtractor("https://example.com/page")
content = await extractor.extract()
print(content)
asyncio.run(extract_content())
3️⃣ SEO Analysis
from webAudit.seo import analyze_seo
seo_report = analyze_seo("https://example.com")
print(seo_report)
4️⃣ Crawl a Website
import asyncio
from webAudit.crawler import async_crawl_with_links
async def crawl_site():
pages = await async_crawl_with_links("https://example.com", max_pages=10)
print(pages)
asyncio.run(crawl_site())
5️⃣ PageSpeed Insights
from webAudit.pagespeed import pagespeed_audit
result = pagespeed_audit("https://example.com", api_key="YOUR_API_KEY", strategy="mobile")
print(result)
Requirements
- Python 3.10+
aiohttpbeautifulsoup4lxmltqdm
Install dependencies via pip:
pip install -r requirements.txt
Contributing
- Fork the repository
- Create a new branch (
git checkout -b feature-name) - Make your changes
- Commit (
git commit -m "Add new feature") - Push (
git push origin feature-name) - Open a Pull Request
License
Contact
For questions or support:
- Email:
info@shailatech.com - GitHub: https://github.com/amjadkhan345/Website_audit
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 webAudit-0.1.3.tar.gz.
File metadata
- Download URL: webAudit-0.1.3.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6269b146194893bc51d77cc39c8d2afeee9eca40fe479cb321c458327246be63
|
|
| MD5 |
a13d4e51576cbe3fbc1079f7479238f3
|
|
| BLAKE2b-256 |
5a6248772ab1b876dbd60145af0679cdbb2bb2c93d8b46123ea964a50aba84ad
|
File details
Details for the file webAudit-0.1.3-py3-none-any.whl.
File metadata
- Download URL: webAudit-0.1.3-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f9ae8b8625b4fc5951572d31542defd9d1ccf20ae023bd6ffb63a07576681fd
|
|
| MD5 |
dc0c54630f82eff3a4be358b22402c3c
|
|
| BLAKE2b-256 |
0b73ca89576643324a3181552c6ddd38dded9abf7fde10ed5099288053358544
|