Skip to main content

A Python Wrapper To Retrieve Data From The CrowdTangle API

Project description

PyCrowdTangle

A Python Wrapper To Retrieve Data From The CrowdTangle API

Install

pip install PyCrowdTangle

Update

pip install PyCrowdTangle -U

Example

Open In Colab

Usage

ct_get_posts

import PyCrowdTangle as pct

#retrieve data from CrowdTangle
# get the api_token from https://apps.crowdtangle.com/
# you can locate your API token via your crowdtangle dashboard
# under Settings > API Access.

data = pct.ct_get_posts(api_token="AKJHXDFYTGEBKRJ6535")

import pandas as pd

df = pd.DataFrame(data['result']['posts'])

#show results
df.head()

ct_get_links

import PyCrowdTangle as pct

#retrieve data from CrowdTangle
# get the api_token from https://apps.crowdtangle.com/
# you can locate your API token via your crowdtangle dashboard
# under Settings > API Access.

data = pct.ct_get_links(link= 'http://www.queenonline.com/', platforms='facebook',
                     start_date='2019-01-01',api_token="AKJHXDFYTGEBKRJ6535")

import pandas as pd

df = pd.DataFrame(data['result']['posts'])

#show results
df.head()

ct_get_lists

import PyCrowdTangle as pct

#retrieve data from CrowdTangle
# get the api_token from https://apps.crowdtangle.com/
# you can locate your API token via your crowdtangle dashboard
# under Settings > API Access.

data = pct.ct_get_lists(api_token="AKJHXDFYTGEBKRJ6535")

#show results
print(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

PyCrowdTangle-0.5.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file PyCrowdTangle-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: PyCrowdTangle-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for PyCrowdTangle-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c89a653fbfcdbdeaa7b29d8915e17af5dde11e9afb631b3061eaab534732a7b
MD5 690efc28f2ceda40c5bd5e2f06884506
BLAKE2b-256 d7309e39dafc376fc68d16dbdee8640ef991002328923f3d63002f15186717b1

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