Skip to main content

Library to generate XML sitemaps for websites and images. Boost SEO by indexing image URLs for better visibility on search engines.

Project description

🗺️ image_sitemap


PyPI version Python versions Downloads

Image & Website Sitemap Generator - SEO Tool for Better Visibility

Sitemap Images is a Python tool that generates a specialized XML sitemap file, allowing you to submit image URLs to search engines like Google, Bing, and Yahoo. This tool helps improve image search visibility, driving more traffic to your website and increasing engagement. To ensure search engines can discover your sitemap, simply add the following line to your robots.txt file:

Sitemap: https://example.com/sitemap-images.xml

By including image links in your sitemap and referencing it in your robots.txt file, you can enhance your website's SEO and make it easier for users to find your content.

Google image sitemaps standard description - Click.

📦 Features

  • Supports both website and image sitemap generation
  • Easy integration with existing Python projects
  • Helps improve visibility in search engine results
  • Boosts image search performance

✍️ Examples

  1. Set website page and crawling depth, run script
    import asyncio
    
    from image_sitemap import Sitemap
    from image_sitemap.instruments.config import Config
      
    images_config = Config(
        max_depth=3,
        accept_subdomains=True,
        is_query_enabled=False,
        file_name="sitemap_images.xml",
        header={
           "User-Agent": "ImageSitemap Crawler",
           "Accept": "text/html",
        },
    )
    sitemap_config = Config(
        max_depth=3,
        accept_subdomains=True,
        is_query_enabled=False,
        file_name="sitemap.xml",
        header={
           "User-Agent": "ImageSitemap Crawler",
           "Accept": "text/html",
        },
    )
    
    asyncio.run(Sitemap(config=images_config).run_images_sitemap(url="https://rucaptcha.com/"))
    asyncio.run(Sitemap(config=sitemap_config).run_sitemap(url="https://rucaptcha.com/"))
    
  2. Get sitemap images data in file
    <?xml version="1.0" encoding="UTF-8"?>
    <urlset
        xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
        <url>
            <loc>https://rucaptcha.com/proxy/residential-proxies</loc>
            <image:image>
                <image:loc>https://rucaptcha.com/dist/web/assets/rotating-residential-proxies-NEVfEVLW.svg</image:loc>
            </image:image>
        </url>
    </urlset>
    
    Or just sitemap file
    <?xml version="1.0" encoding="UTF-8"?>
    <urlset
       xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
       <url>
           <loc>https://rucaptcha.com/</loc>
       </url>
       <url>
           <loc>https://rucaptcha.com/h</loc>
       </url>
    </urlset>
    

You can check examples file here - Click.

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

image_sitemap-2.0.0.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

image_sitemap-2.0.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file image_sitemap-2.0.0.tar.gz.

File metadata

  • Download URL: image_sitemap-2.0.0.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for image_sitemap-2.0.0.tar.gz
Algorithm Hash digest
SHA256 65f0ef5ed87cc2c5c2122390a8bd3e365c5a7fdf7a8b042dec89b90725060973
MD5 0f3796e87ed9275eb6f478963018a6a1
BLAKE2b-256 3041651628ec1b1af8a7b377fc1ecaac111248e0a4db57962f67a4426b21c3e4

See more details on using hashes here.

File details

Details for the file image_sitemap-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: image_sitemap-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for image_sitemap-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5437089744be04883d18b3b5b1301341314839e99b33f5d42e37dbe463060f26
MD5 b09b4b2301c635a5f5d67a64c4838dfb
BLAKE2b-256 e98c9c96eefd3c2940cff6f8526002a2196331c0c71f94ac14f6b355c39f683d

See more details on using hashes here.

Supported by

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