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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

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
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
  • -B [OUTPUT_DIRECTORY]: generate a Bash script to launch this script and exit

License

MIT

Link

About

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

Resources

License

Stars

Watchers

Forks

Languages