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.
submit_urls.py has been tested for Blogger on Debian Testing on WSL 2 and
requires the following packages:
google-api-python-clientto access Google APIspandasto extract updated URLs from the sitemappython-gnupgto invoke GnuPG for decrypting your encrypted JSON key file and API key file for authorizationxmltodictto convert the sitemap to a dictionary
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 -Usubmit_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_urljson_key_pathapi_key_path
Then, execute:
submit_urls.py-n: do not perform POST requests-BS: save a Bash script to$HOME/Downloadsto launch this script and exit
This project is licensed under the MIT License. The .gitignore
file is sourced from gitignore, which
is licensed under the CC0-1.0 license.
- Bash Scripting to Submit Appropriate URLs through Bing Webmaster API: a blog post providing background on the original Bash script, now implemented in Python