Skip to main content

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.

Project description

Python SEO Analyzer

Googling Google by taleas.com

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.

seoanalyze http://www.domain.com/

Or you can specify the path to a sitmap to seed the urls to scan list.

seoanalyze http://www.domain.com/ --sitemap path/to/sitemap.xml

HTML output can be generated from the analysis instead of json.

seoanalyze http://www.domain.com/ --output-format html

API

The analyze function returns a dictionary with the results of the crawl.

from seoanalyzer import analyze

output = 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

from seoanalyzer import analyze

output = 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

from seoanalyzer import analyze

output = analyze(site, sitemap, follow_links=False)

print(output)

Alternatively, you can run the analysis as a script from the seoanalyzer folder.

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:

instead of..

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyseoanalyzer-2024.4.21.tar.gz (4.3 MB view details)

Uploaded Source

Built Distribution

pyseoanalyzer-2024.4.21-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file pyseoanalyzer-2024.4.21.tar.gz.

File metadata

  • Download URL: pyseoanalyzer-2024.4.21.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pyseoanalyzer-2024.4.21.tar.gz
Algorithm Hash digest
SHA256 3e6da9e67d3f33879ed2213c78b5f19f5cd1a1017ff622c673aad377cfe217d1
MD5 b659bc94d7a9d982d87f41015e9e5f79
BLAKE2b-256 85bd8390e1bac97c9c8f71f11d550f896f55f89eae7c5d7403946a8f4929b9e4

See more details on using hashes here.

File details

Details for the file pyseoanalyzer-2024.4.21-py3-none-any.whl.

File metadata

File hashes

Hashes for pyseoanalyzer-2024.4.21-py3-none-any.whl
Algorithm Hash digest
SHA256 a698b33113201e4d41abcf3fb4c0d0e3f40979f88e0fdfacbb8bc917805f7598
MD5 bb564895ee5cef0e2c192af6693c7c2a
BLAKE2b-256 f07f759ef58dd176d3bdf467ce98612c3817ce1001a10af83bf96b865bfc2429

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page