Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sethblack/python-seo-analyzer
An SEO tool that analyzes the structure of a site, crawls the site, count words in the body of the site and warns of any technical SEO issues.
https://github.com/sethblack/python-seo-analyzer
analyzer python python-3 python-seo-analyzer python3 search-engine seo seo-monitor seo-optimization technical-seo
Last synced: 29 days ago
JSON representation
An SEO tool that analyzes the structure of a site, crawls the site, count words in the body of the site and warns of any technical SEO issues.
- Host: GitHub
- URL: https://github.com/sethblack/python-seo-analyzer
- Owner: sethblack
- License: other
- Created: 2012-12-28T21:52:13.000Z (almost 12 years ago)
- Default Branch: main
- Last Pushed: 2024-10-07T02:16:46.000Z (about 1 month ago)
- Last Synced: 2024-10-07T21:29:44.623Z (about 1 month ago)
- Topics: analyzer, python, python-3, python-seo-analyzer, python3, search-engine, seo, seo-monitor, seo-optimization, technical-seo
- Language: Python
- Homepage:
- Size: 149 KB
- Stars: 1,162
- Watchers: 59
- Forks: 300
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Python SEO Analyzer
===================An SEO tool that analyzes the structure of a site, crawls the site, counts words in the body of the site and warns of any technical SEO issues.
Requires Python 3.6+, BeautifulSoup4 and urllib3.
Installation
------------### PIP
```
pip3 install pyseoanalyzer
```### Docker
```
docker run sethblack/python-seo-analyzer [ARGS ...]
```Command-line Usage
------------------If you run without a sitemap it will start crawling at the homepage.
```sh
seoanalyze http://www.domain.com/
```Or you can specify the path to a sitmap to seed the urls to scan list.
```sh
seoanalyze http://www.domain.com/ --sitemap path/to/sitemap.xml
```HTML output can be generated from the analysis instead of json.
```sh
seoanalyze http://www.domain.com/ --output-format html
```API
---The `analyze` function returns a dictionary with the results of the crawl.
```python
from pyseoanalyzer import analyzeoutput = analyze(site, sitemap)
print(output)
```In order to analyze heading tags (h1-h6) and other extra additional tags as well, the following options can be passed to the `analyze` function
```python
from pyseoanalyzer import analyzeoutput = analyze(site, sitemap, analyze_headings=True, analyze_extra_tags=True)
print(output)
```By default, the `analyze` function analyzes all the existing inner links as well, which might be time consuming.
This default behaviour can be changed to analyze only the provided URL by passing the following option to the `analyze` function
```python
from pyseoanalyzer import analyzeoutput = analyze(site, sitemap, follow_links=False)
print(output)
```Alternatively, you can run the analysis as a script from the seoanalyzer folder.
```sh
python -m seoanalyzer https://www.sethserver.com/ -f html > results.html
```Notes
-----If you get `requests.exceptions.SSLError` at either the command-line or via the python-API, try using:
- http://www.foo.bar
**instead** of..
- https://www.foo.bar