All Projects → knyzorg → Sitemap Generator Crawler

knyzorg / Sitemap Generator Crawler

Licence: mit
Script that generates a sitemap by crawling a given URL

Projects that are alternatives of or similar to Sitemap Generator Crawler

Sitemap Generator
Easily create XML sitemaps for your website.
Stars: ✭ 273 (+61.54%)
Mutual labels:  sitemap, crawler, seo
Laravel Sitemap
Create and generate sitemaps with ease
Stars: ✭ 1,325 (+684.02%)
Mutual labels:  sitemap, xml, seo
Sitemap Generator Cli
Creates an XML-Sitemap by crawling a given site.
Stars: ✭ 214 (+26.63%)
Mutual labels:  sitemap, crawler, seo
Dctb Links
My Personal Links
Stars: ✭ 65 (-61.54%)
Mutual labels:  sitemap, seo
Nextjs Sitemap Generator
Generate sitemap.xml from nextjs pages
Stars: ✭ 395 (+133.73%)
Mutual labels:  sitemap, xml
Next Sitemap
Sitemap generator for next.js. Generate sitemap(s) and robots.txt for all static/pre-rendered/dynamic/server-side pages.
Stars: ✭ 426 (+152.07%)
Mutual labels:  sitemap, seo
strapi-plugin-sitemap
🔌 Generate a highly customizable sitemap XML in Strapi CMS
Stars: ✭ 136 (-19.53%)
Mutual labels:  sitemap, seo
Laravel Seo Tools
Laravel Seo package for Content writer/admin/web master who do not know programming but want to edit/update SEO tags from dashboard
Stars: ✭ 99 (-41.42%)
Mutual labels:  sitemap, seo
Gatsby Advanced Starter
A high performance skeleton starter for GatsbyJS that focuses on SEO/Social features/development environment.
Stars: ✭ 1,224 (+624.26%)
Mutual labels:  sitemap, seo
Crawlerpack
Java 網路資料爬蟲包
Stars: ✭ 99 (-41.42%)
Mutual labels:  xml, crawler
Prerender Java
java framework for prerender
Stars: ✭ 115 (-31.95%)
Mutual labels:  crawler, seo
Supercrawler
A web crawler. Supercrawler automatically crawls websites. Define custom handlers to parse content. Obeys robots.txt, rate limits and concurrency limits.
Stars: ✭ 306 (+81.07%)
Mutual labels:  sitemap, crawler
Hquery.php
An extremely fast web scraper that parses megabytes of invalid HTML in a blink of an eye. PHP5.3+, no dependencies.
Stars: ✭ 295 (+74.56%)
Mutual labels:  xml, crawler
Sitemap Module
Sitemap Module for Nuxt
Stars: ✭ 539 (+218.93%)
Mutual labels:  sitemap, seo
Graphquery
GraphQuery is a query language and execution engine tied to any backend service.
Stars: ✭ 112 (-33.73%)
Mutual labels:  xml, crawler
Sitemap
PHP XML Sitemap Generation
Stars: ✭ 128 (-24.26%)
Mutual labels:  sitemap, xml
Rendora
dynamic server-side rendering using headless Chrome to effortlessly solve the SEO problem for modern javascript websites
Stars: ✭ 1,853 (+996.45%)
Mutual labels:  crawler, seo
spiderable-middleware
🤖 Prerendering for JavaScript powered websites. Great solution for PWAs (Progressive Web Apps), SPAs (Single Page Applications), and other websites based on top of front-end JavaScript frameworks
Stars: ✭ 29 (-82.84%)
Mutual labels:  crawler, seo
SitemapTools
A sitemap (sitemap.xml) querying and parsing library for .NET
Stars: ✭ 19 (-88.76%)
Mutual labels:  sitemap, xml
Craft Sitemap
Craft plugin to generate a sitemap.
Stars: ✭ 105 (-37.87%)
Mutual labels:  sitemap, seo

Sitemap Generator

Features

  • Actually crawls webpages like Google would
  • Generates a seperate XML file which gets updated every time the script gets executed (Runnable via CRON)
  • Awesome for SEO
  • Crawls faster than online services
  • Verbose logging
  • Completely usable through CLI
  • Color support in CLI mode
  • Customizable
  • Author is active on Github, open an issue for support
  • Literally the best open-source sitemap script written in PHP
  • Non-restrictive licensing

Usage

Usage is pretty straight forward:

  • Configure the crawler by modifying the config section of the sitemap.php file
    • Select the file to which the sitemap will be saved
    • Select URL to crawl
    • Configure blacklists, accepts the use of wildcards (example: http://example.com/private/* and *.jpg)
  • Generate sitemap
    • Either send a GET request to this script or use it from the CLI as seen below
    • A sitemap will be generated and saved
    • Submit to Google
  • For better results
    • Setup a CRON Job to execute the php script

CLI Usage

Sometimes you need to run the script for a large number of domains (If you are a webhost for example). This sitemap generator allows you to override any variable on-the-fly in CLI.

Basic usage

Scan http://www.mywebsite.com/ and output the sitemap to /home/user/public_html/sitemap.xml:

php sitemap.php file=/home/user/public_html/sitemap.xml site=http://www.mywebsite.com/

Advanced usage

While the above is the most common use-case, sometimes you need to modify other things such as $debug or $blacklist. I will do a bit of explaining about how shells work so you don't mess up.

Lets start with the blacklist which is a one-dimensional array. This is how you would pass an array as a GET request.

php sitemap.php blacklist[]="foo"&blacklist[]="bar"

Shells are different however as [] is parsed as a shell expansion and & as a fork-to-background. You want neither of those things. As such, you want to escape both of them resulting in the following:

php sitemap.php blacklist\[]="foo"\&blacklist\[]="bar"

Next, let's tackle the $debug variable. All the same concepts apply but the syntax is slightly different:

php sitemap.php debug\["add"]=true\&debug\["warn"]=false\&debug\["reject"]=true

Important note: Overriding an array does exactly what it means. Previously defined elements are destroyed.

Running Tests

Acknowledgements

This section is devoted as a thank you for everybody who helped create this script.

Richard Leishman and Web Forward for the regex at the heart of the script.
Anatoli Nicolae for fixing a bug in the regex
Mario Bouchard for fixing #32 and #35 with his first pull request
Santeri Kannisto from 2 Global Nomads for a number of features and many, many bug reports

License

MIT License

Copyright (c) 2017 Slava Knyazev <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].