Giter Site home page Giter Site logo

hreflang-checker's Introduction

hreflang-chcker

Has a few options on how to check your sites hreflang works purely on the live site.

Packages to install: just install all the imports at the top of the script** runs on python 3.x

Just added some sitemap checking functionality, have not acutally come accross much that does this so maybe useful for some people. It struggles with massive sites since i have not done any real optimisation, i think the biggest that worked for me was about 50k pages:

works with the 3 classes.

  1. page_check: takes a URL, checks that the URL has correct hreflang (also checks the alternates pointed to).
  2. crawler: takes a URL, starts a free crawler from there which will check all the pages it finds (also checks the alternates pointed to).
  3. sitemap: takes the homepage, downloads and parses all the sitemaps and runs the various checks on them as it goes.

example usage of the crawler (checks on page hreflang):

  • innit the crawler
a = a.crawler("https://www.example.com")

  • get the homepage from there to get the robots link... ugly i know, but it works
roboter = a.home_page + "robots.txt"

  • get robots parser going
rp = robotparser.RobotFileParser()
rp.set_url(roboter)
rp.read()
  • start the crawl
a.rec_crawl()

^^This will start the free crawl running, doing the checks as it goes and loggin the results as it goes.

example usage of the sitemap checker (checks sitemap hreflang):

  • innit the whole jobby
a = sitemap("https://www.example.com")
  • this part does everything else from downloading all the sitemaps to running all the checks and storing them in a dictionary
data = a.check_data()

hreflang-checker's People

Contributors

ilamaaa avatar mofe23 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.