Skip to main content

Unofficial Octoparse API client.

Project description

Octoparse

Python 3.6 Python 3.7 Python 3.8

Unofficial Octoparse API client in python

With support for Advanced API and China as well

Installation:

use pip to install:

pip install octoparse

Example usage:

from octoparse import Octoparse

# initialize api client
# it will try to log in & ask for credentials if required
octo = Octoparse()

# if using advanced API:
octo = Octoparse(advanced_api=True)

# if using from China:
octo = Octoparse(china=True)

# List all task groups
groups = octo.list_all_task_groups()

# List all tasks in a group
tasks = octo.list_all_tasks_in_group(group_id='xxxx-ssdsd-1212')

# Check if a task is currently running. This isn't provided in Standard API.
status = octo.is_task_running(task_id='abcd-1234-djfsd-dfdf')

# Export the not exported data
data = octo.get_not_exported_data(task_id='abcd-1234-djfsd-dfdf', size=100)

# Update data status
resp = octo.update_data_status(task_id='abcd-1234-djfsd-dfdf')

# get data for a task with task id: 'abcd-1234-djfsd-dfdf'
data = octo.get_task_data(task_id='abcd-1234-djfsd-dfdf')

# get task data as a pandas.DataFrame for a task with task id: 'abcd-1234-djfsd-dfdf'
df = octo.get_task_data_df(task_id='abcd-1234-djfsd-dfdf')

# clear data for a task with task id: 'abcd-1234-djfsd-dfdf'
octo.clear_task_data(task_id='abcd-1234-djfsd-dfdf')

Following are supported for Advanced API

# Get Tasks' status
task_list = ['abcd-1234-djfsd-dfdf', 'ab23-5677-djfsd-dfdf']
resp = octo.get_task_status(task_list)

# Get Task's parameter
resp = octo.get_task_param(task_id='abcd-1234-djfsd-dfdf', name='loopAction1.Url')

# Update Task's parameter
resp = octo.update_task_param(task_id='abcd-1234-djfsd-dfdf', name='loopAction1.Url', value='http://xyz.abc')

# Add new URLs/text to an existing loop
resp = octo.add_url_text_to_loop(task_id='abcd-1234-djfsd-dfdf', name='loopAction1.Url', value='http://xyz.abc')

# Start running task
resp = octo.start_task(task_id='abcd-1234-djfsd-dfdf')

# Stop running task
resp = octo.stop_task(task_id='abcd-1234-djfsd-dfdf')

Project details


Download files

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

Source Distribution

octoparse-1.3.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distributions

octoparse-1.3.2-py3.8.egg (12.2 kB view details)

Uploaded Source

octoparse-1.3.2-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file octoparse-1.3.2.tar.gz.

File metadata

  • Download URL: octoparse-1.3.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.23.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.3

File hashes

Hashes for octoparse-1.3.2.tar.gz
Algorithm Hash digest
SHA256 0bb0d46350d7120020ecfdefd79b5fde861e765a176803e7320aa9041bd303da
MD5 cc88ab3699ebfed0402480501ad07607
BLAKE2b-256 bfbbf836b01ab63301dd9638a6001a761e483720957122f17e4aa94e3ed526e9

See more details on using hashes here.

File details

Details for the file octoparse-1.3.2-py3.8.egg.

File metadata

  • Download URL: octoparse-1.3.2-py3.8.egg
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.23.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.3

File hashes

Hashes for octoparse-1.3.2-py3.8.egg
Algorithm Hash digest
SHA256 9a8d62244c825c7bf1a53407bff16b91c1103d93b8c49420fdcae94fddf15d87
MD5 080801769c2a16638aa31f240eae9447
BLAKE2b-256 36c4c8b814dfe2ac9b57b7cabe55cca7c28f0f121d0fdb065d64db8649a99ab8

See more details on using hashes here.

File details

Details for the file octoparse-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: octoparse-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.23.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.3

File hashes

Hashes for octoparse-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 489ee406731b6a21579b507f59b32448af9dc26b31fc4a60c60ebbc7b180685c
MD5 4090d69cf1d83c2611e71b112924f1d3
BLAKE2b-256 7adc22ee1235205fa2a025e831a45855ffd583a0af5a77331ef24dea11dab331

See more details on using hashes here.

Supported by

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