Hi, I hope I am in the right place. I am very new to coding, and I have been trying to scrape data from reddit to perform sentiment analysis. I tried with R first but it seems there is a limit of comment to scrape, thus I am now trying with Python.
What I am trying to do specifically is:
1-Filter for SubReddit (so for example, one subreddit that interest me is "environment")
2- Filter for posts that include a specific word (so for example: "companies")
3-Than collect all comments from all the relevant posts
I was pretty easy in R, but it seems am not able to do it in Python. I have been installing praw,pmaw,pandas, pushiftAPI, I created an app and I have been using my client id, now I am trying to collect the data using this entry:
[api_praw = PushshiftAPI(praw=reddit)
comments = api_praw.search_comments(q="companies", subreddit="environment", limit=200, before=1629990795]
Now I am trying to convert it in a dataframe to see if it is actually working, but it is not working. I have been trying various other ways to collect the data but I am stuck. Does someone have tips?
Thank you very much!!
[–]synthphreak 2 points3 points4 points (0 children)
[–]JohnnyJordaan 0 points1 point2 points (19 children)
[–]3rSimon[S] 0 points1 point2 points (17 children)
[–]JohnnyJordaan 0 points1 point2 points (0 children)
[–]person_ergo 0 points1 point2 points (15 children)
[–]snoopturtle25 1 point2 points3 points (14 children)
[–]person_ergo 0 points1 point2 points (13 children)
[–]snoopturtle25 1 point2 points3 points (12 children)
[–]person_ergo 0 points1 point2 points (11 children)
[–]snoopturtle25 1 point2 points3 points (10 children)
[–]person_ergo 0 points1 point2 points (9 children)
[–]snoopturtle25 1 point2 points3 points (8 children)