Skip to content

Instantly share code, notes, and snippets.

@Yomguithereal
Last active April 21, 2020 21:10
Show Gist options
  • Save Yomguithereal/296b150c332d30cd922cd676b1520801 to your computer and use it in GitHub Desktop.
Save Yomguithereal/296b150c332d30cd922cd676b1520801 to your computer and use it in GitHub Desktop.
API CT Minet python
from minet.crowdtangle import crowdtangle_summary
for result in crowdtangle_summary(urls, token='TOKEN', start_date='2017-08-01'):
print(result.stats)
print(result.posts)
from minet import RateLimitedIterator
from minet.crowdtangle import crowdtangle_summary
iterator = RateLimitedIterator(urls)
for url in iterator:
try:
result = crowdtangle_summary(url, token='TOKEN', start_date='2017-08-01')
print(result.stats)
except Exception as e:
iterator.retry()
continue
from minet.crowdtangle import CrowdtangleClient
ct = CrowdtangleClient(rate_limit=50, token='TOKEN')
for url in iterator:
stats, posts = ct.summary(url, start_date='2017-08-01')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment