Bash scripts that refer to the sitemap and submit the URLs of newer entries than the last submission through the Bing Webmaster API or Yandex.Webmaster API.
These scripts have been tested for Blogger on Debian bullseye on WSL 1 and use the following packages:
- curl to retrieve the sitemap and submit URLs
- xq included in the yq package to transcode XML to JSON
- jq to filter JSON data
- GnuPG to encrypt the configuration file
Install each package as needed. For example:
sudo apt install curl
pip install yq
sudo apt install jq
sudo apt install gpgMake sure that Bash can find these scripts in the directories of the
PATH. For example:
PATH=$HOME/path/to/submit-urls:$PATHor
cp -i *.sh ~/.local/binIf the configuration file ~/.config/SCRIPT_BASENAME.cfg.gpg does not
exist, the following scripts will create and encrypt it assuming that
the default key of GnuPG is your OpenPGP key pair.
Prepare an API key for authorization, and replace the values of the following variables in the configuration file with yours:
SITEMAPSITE_URLAPI_KEY
Then:
submit-urls-bing.shPrepare an access token, user ID, and host ID for authorization and using the API, and replace the values of the following variables in the configuration file with yours:
SITEMAPaccess_tokenUSER_IDHOST_ID
Then:
submit-urls-yandex.sh-n(dry run) retrieves the sitemap and shows newer entries than the last submission but does not submit them.-s(silent) does not show any output except for an error message from curl.
The script submit-urls-yandex.sh repeats a request for each URL
because the queue
method
of the API does not seem to support arrays.
Blog posts for more details:

