You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import sys
from pmaw import PushshiftAPI
import json
import os
api = PushshiftAPI(num_workers=os.cpu_count(), rate_limit=100)
id_f = sys.argv[1]
comment_ids = [l.strip() for l in open(id_f, 'r')]
comments_arr = api.search_comments(ids=comment_ids)
for c in comments_arr:
print(json.dumps(c))
The script takes in IDs from a file, puts them into a list, and passes them into search_comments.
This script has worked fine once (en masse for lots of IDs), but for some reason, it now never completes on even a test set of 10 IDs. I'm certain I must be doing something silly, or the API has potentially changed. Could someone point me in the right direction?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi there!
I have a very simple PMAW script:
The script takes in IDs from a file, puts them into a list, and passes them into search_comments.
This script has worked fine once (en masse for lots of IDs), but for some reason, it now never completes on even a test set of 10 IDs. I'm certain I must be doing something silly, or the API has potentially changed. Could someone point me in the right direction?
Thanks!
The text was updated successfully, but these errors were encountered: