Git Product home page Git Product logo

indx's Introduction

indx

Python script to submit URLs to Google via Indexing API

Usage

First you will need to set up a project on Google Cloud Platform.

Once you do that, you will need to create a service account. Download the JSON key file from the service account and save it in the same directory as this repository and rename it to key_file.json

To verify the ownership of the website, you will need to add the service account as a delegated owner to the Google Search Console.

Prerequisites

  • Python 3.*
  • argparse (for Python >= 3.2 included in the Python Standard Library)
  • Google Client Library
  • httplib2

If you already have Python 3.* installed, for the most part, running the following command in the terminal will do:

pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib

In a nutshell, to use the script:

arguments:

  • {i,r} - set if you want to index (i) or remove (r) URLs
  • {s,m} - set if you are submitting a single (s) (URL) or multiple (m) URLs (CSV)
  • path - URL or path to csv file

Examples

Index a single URL

python indx.py i s https://example.com/my-path

Index multiple URLs

python indx.py i m myurllist.csv

Remove a single URL from the index

python indx.py r s https://example.com/my-path

Remove multiple URLs from the index

python indx.py r m myurllist.csv

indx's People

Contributors

dinokukic avatar twf-nikhila avatar

Stargazers

 avatar Matt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.