Skip to content

Python script that refers to sitemap and submits URLs through Indexing API and Bing Webmaster API

License

Notifications You must be signed in to change notification settings

carmine560/submit-urls

Repository files navigation

submit-urls

The submit_urls.py Python script refers to the sitemap and submits the URLs of newer entries than the last submission through the Indexing API and the Bing Webmaster API.

Prerequisites

submit_urls.py has been tested for Blogger on Debian Testing on WSL 2 and requires the following packages:

Install each package as needed. For example:

sudo apt install gpg
git clone --recurse-submodules [email protected]:carmine560/submit-urls.git
cd submit-urls
# Run 'git submodule update --init' if you cloned without
# '--recurse-submodules'.
python -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt -U

Usage

submit_urls.py will create a ~/.config/submit-urls/submit_urls.ini configuration file if it does not already exist.

First, prepare your JSON key file for the Indexing API and API key file for the Bing Webmaster API, and encrypt them using GnuPG with your OpenPGP key pair. Next, replace the values of the following options in the configuration file with your own:

  • sitemap_url
  • json_key_path
  • api_key_path

Then, execute:

submit_urls.py

Options

  • -n: do not perform POST requests
  • -BS: save a Bash script to $HOME/Downloads to launch this script and exit

License

This project is licensed under the MIT License. The .gitignore file is sourced from gitignore, which is licensed under the CC0-1.0 license.

Link

About

Python script that refers to sitemap and submits URLs through Indexing API and Bing Webmaster API

Resources

License

Stars

Watchers

Forks

Languages