seospace / gsapi

GSA Search Engine Ranker API <- simple HTTP server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gsapi

Simple HTTP server for GSA Search Engine Ranker.
It makes possible to integrate 3rd party tools or custom coded scripts instead of using script-manual .

Created mainly to integrate ZennoPoster templates.

How to install:

  1. Download and install Python 3.6.3+
  2. Download repo and run install.py
  3. Run gsapi_server.py
  4. Add to your C:\Windows\System32\drivers\etc\hosts file this line:
  • 127.0.0.1 gsapi.local

How does it work?

  1. Create your new engine, using cookiecutter, lets call this engine "example.com":

  1. Paste your new engine into SER /engines/ folder.
  2. Run your project:

  1. You have script that will create link for you (for example Zennoposter)
  2. To know if there's a pending task to create a link, your script will requests endpoint:
{
  "results": {
    "data": "{\"engine_name\": \"example.com\", \"target_url\": \"http://example.com\", \"url\": \"http://google.com\"}",
    "link_id": 1
  },
  "success": true
}

  1. In case there are no tasks, you will receive:

{
  "results": "No tasks for example.com",
  "success": false
}
  1. In case you need an article, or something else, just edit your example.com.ini file:

That's what your consumer will see:

{
  "results": {
    "data": "{\"engine_name\": \"example.com\", \"target_url\": \"http://example.com\", \"url\": \"http://google.com\", \"some_variable\": \"some data\"}",
    "link_id": 2
  },
  "success": true
}

  1. After your script (for example Zennoposter template) builds a link, you just simply have to tell gsapi location of the link:
{
  "results": {
    "data": "{\"engine_name\": \"example.com\", \"target_url\": \"http://example.com\", \"url\": \"http://google.com\", \"some_variable\": \"some data\"}",
    "link_id": 2
  },
  "success": true
}

  1. Now SER will be redirected to http://google.com:

  1. In case your script (ZennoPoster template) get's wrong (ex. your internet connection is down, BAD END), you can set the link_id to "not working", so it can be consumed again, simply call this endpoint:
{
  "results": {
    "data": "{\"engine_name\": \"example.com\", \"target_url\": \"http://example.com\", \"url\": \"http://google.com\"}",
    "link_id": 1
  },
  "success": true
}

helpfull commands and tools:

  • cmder
  • cd .. && rm -r example.com && cookiecutter . && cd example.com && python paste_into_gsa.py

About

GSA Search Engine Ranker API <- simple HTTP server

License:MIT License


Languages

Language:Python 100.0%