Skip to main content

Skyrunner scrapes with json definition

Project description

Skyrunner

Introduction

Skyrunner scrapes with json definition

Installation

$ pip install skyrunner

How to use

  1. Import skyrunner package at your project.

  2. You define steps of scraping in json file.

  3. You create class for share on scraping tasks and define self.attributes = dict() at constructor.

class TaskSharedData:
    def __init__(self):
        self.attributes = dict()
  1. You call skyrunner.setup_task_manager(‘scraping_steps_defined.json’, TaskSharedData()) at your program.

sample of Scraping task definition json

{
   "description": "tasks description",
   "driver": {
     "name": "webdriver",
     "browser": "firefox"
   },
   "tasks": [
     {
       "description": "access to google",
       "action": "link",
       "params": {
         "url": "https://google.com"
       }
     },
     {
       "description": "search for mileshare",
       "action": "input",
       "params": {
         "type": "id",
         "path": "lst-ib",
         "data": "mileshare"
       }
     },
     {
       "description": "search(press the enter key)",
       "action": "enter",
       "params": {
         "type": "id",
         "path": "lst-ib"
       }
     }
   ]
 }

other support actions

  • click

{
  "description": "click task",
  "action": "click",
  "params": {
    "type": "id or xpath",
    "path": "target id or xpath"
  }
}
  • custom

{
   "description": "custom task for complex process, update the shared data etc..",
   "action": "custom",
   "params": {
     "type": "python",
     "script_file": "custom python script(class) path",
     "class_name": "custom python class name"
   }
 }
  • shared_input

{
  "description": "shared input task",
  "action": "shared_input",
  "params": {
    "type": "id or xpath",
    "path": "target id or xpath",
    "data": "dict key of shared data"
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skyrunner-0.0.4-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file skyrunner-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: skyrunner-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/28.8.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.2

File hashes

Hashes for skyrunner-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1f82d1f75a59066f54f61ccb927af26e241a15585ee79e311c4ae2de7fa02f56
MD5 3cd73521234ea947932ffe7e563518ae
BLAKE2b-256 623fc44ced16ca9e543cbd9eefe654d22270c986b4dd24204ef2a046e176bf46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page