![]() Second, a user needs to have a minimum amount of karma which Reddit hasn’t clearly specified (to stop spammers from creating new subreddits). First, your user account should be 30 days or old. In order to create a subreddit, there are some prerequisites a user needs to fulfill. ![]() So without wasting more time, let’s look at some things you must know to create a subreddit. In addition, you also have one or more moderators to keep spam off the community, make rules and enforce rules, keep an eye on the users, etc. ![]() Community members can post, comment, and upvote/downvote the posts. Simply put, each subreddit has a main focal point and all the posts revolve around it. If that’s the case, here is how to create a Reddit community or subreddit in a few easy steps! Create a Reddit Subreddit Community However, there is still a possibility of not being able to find the subreddit you’re looking for. Whether you wish to discuss DC comics or fly an FPV drone, a subreddit provides you an environment to learn and grow. Think of any topic under the sun and most likely there is a subreddit for it. I dumped the dataframe into a Google Sheet for you to explore.Reddit communities or subreddits, as they are called, are a great way to connect to people with similar interests. We now have a nice clean dataframe of the top yearly posts from each chosen subreddit, allowing us to see which domains racked up the highest total scores. #merge the three tables together, using submission ID as primary keyĭf_sub_score = df_rge(df_score, how= 'left', on=' id')ĭf_final = df_sub_rge(df_domain, how= 'left', on= 'id') Now that we have dataframes containing score, domain (url), and subreddit we can merge the three tables together, using submission ID as the primary key. #-Grab subreddit for given submission ID-#ĭomains_sub = s.subreddit.display_nameĭf_subreddit = pd.om_dict(domains_sub, orient= 'index').reset_index()ĭf_lumns = Merge dataframes Subreddit = reddit.subreddit(i) #input('enter subreddit name: /r/'))ĭf_domain = pd.om_dict(domains, orient= 'index').reset_index() #sum score across submissions for s in submissions:ĭf_score = pd.om_dict(domains_score, orient= 'index').reset_index() Submissions = subreddit.top( 'year', limit= 50) #-Grab the score for a given submission-#pull in top submissions for the year for subreddit specified in list above #Loop through our selected list of subreddits for i in s_list: ![]() #set up dictionaries to store submission information In this section we're looping through our array of subreddits from above, and storing the score, domain, and subreddit we'll store each of these attributes in 3 separate dataframes, and merge together using the submission ID. 'news ', 'datascience ', etc'] 2) Grab the score, domain (url), and subreddit for each top yearly submission 'enter subreddits you want to include here as comma separated strings - e.g. Reddit = praw.Reddit(client_id= 'my client id', Here we can set up our Praw credentials and select the list of subreddits we want to analyze. 1) Import packages, set up PRAW, select subreddits Ultimately, we want to be able to see which domains (urls) generate the highest scoring posts across a given subreddit. For this example, our goal will be to scrape the top submissions for the year across a few subreddits, storing the following: submission URL, domain (website URL), submission score. Below, we'll show you how to scrape Reddit using Praw (Python Reddit API Wrapper). ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |