0% found this document useful (0 votes)
136 views15 pages

Internship Report

The document summarizes an internship project report on building a Reddit bot. It includes sections on the declaration, abstract, introduction, existing system architecture/working, problem definition, and objectives. The main points are: 1) The project involves building a Reddit bot in Python using the PRAW API to fetch data and automatically reply to comments. 2) A GUI is created using Tkinter to display user requests and bot replies along with shareable links. The bots run in the background while the GUI is active. 3) The objectives are to automatically reply to comments using keywords, save user time, display all comments in the GUI, and maintain user activity on Reddit without direct interaction. 4) The

Uploaded by

Bryan Kg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views15 pages

Internship Report

The document summarizes an internship project report on building a Reddit bot. It includes sections on the declaration, abstract, introduction, existing system architecture/working, problem definition, and objectives. The main points are: 1) The project involves building a Reddit bot in Python using the PRAW API to fetch data and automatically reply to comments. 2) A GUI is created using Tkinter to display user requests and bot replies along with shareable links. The bots run in the background while the GUI is active. 3) The objectives are to automatically reply to comments using keywords, save user time, display all comments in the GUI, and maintain user activity on Reddit without direct interaction. 4) The

Uploaded by

Bryan Kg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Internship-Project Report on

Reddit Bot

Submitted in fulfilment of Apsit Skills Internship-Project of

Semester 3

in

Information Technology

By

Kunal S Shetty (19104071)


Omkar D Bhoir (19104001)

Under the guidance of

Faculty Mentor: name


Student Mentor: name

Department of Information Technology


A.P. Shah Institute of Technology
G.B. Road, Kasarvadavli,
Thane(W), Mumbai-400615
APSIT Skills Internship Program
2020-2021
Declaration

We declare that this written submission represents our ideas in our own words and where others’
ideas or words have been included, we have adequately cited and referenced the original sources.
We also declare that we have adhered to all principles of academic with honesty and integrity and
have not misrepresented or fabricated or falsified any idea/data/fact/source in our submission. We
understand that any violation of the above will be cause for disciplinary action by the Institute and
can also evoke penal action from the sources which have thus not been properly cited or from whom
proper permission has not been taken when needed.

(Kunal S Shetty 19104071)

(Omkar D Bhoir 19104001)

Date:
Abstract

Project is about building a (Reddit bot) bot for Reddit, which will be used to fetch data from
the Reddit for data collection like using the number of upvote and downvotes, also the comment
from the different user without opening the application and getting content which we required. The
bot can also be called by specific name by giving bot keyphrase by which it can be called when it is
needed.

Reddit bot make lot of work easy by examples like it help to reduce task of moderators in
specific subreddit with maintaining and filter post which might seem spam and make checking
through post and comment easy and automatic.
Bot in reddit can help through comments which are not able to response by moderators in the post
and even users in comments in reply to help during the task. In our project we make reddit bot use
with gui in which we are able to get the user and bot reply with shareable link for the post in which
bot has replied.

Reddit consist with many bot, in our project we have included two bots one is normal
response bot which Reponses to user with greeting and other is dictionary bot or wordbot which
help in giving a word meaning if a bot is called along of the word which meaning is require by the
user,
Introduction

Reddit is a popular social media platform, Reddit splits into more than one million
groups known as "subreddits," each covering a different subject. A subreddit name begins
with /r/, which is a part of the URL used by Reddit. For instance, /r / nba is a subreddit
where people talk about the National Basketball Association while /r / boardgames is a
subreddit for people talking about board games. Reddit consist of bot which are simply
scripts that perform things automatically that a normal user could. Anyone can make bots to
perform any task that a normal user could do as long as they have the know-how and
programming skills for it.

Reddit consist many different types of bot according to subreddit and community
requirement by the moderators and can be used in many different either by moderators or the
user of the reddit. Some bots are automatic bots which are run through the web server and
kept running as long as the moderator keep it active for regulation and used to keep the user
who post in the subreddit and check various information about the user that does it have the
amount of karma by which if it will be allowed to post or not and how much days is the user
account in reddit to avoid spam from new accounts and remove any ill comment in the post
which is the not related to the subreddit or the post. There are many bot made by the user
and ran through by using reddit API and running when they need the bot either to follow
them or help then on other task on reddit.

Many different types are consist on reddit the most used are snapshot bot which
snapshots posts posted on the subreddit and archive them by saving it in the database and
keeping it for future and other bot is moderator bot present in subreddit which acts as filter
while posting through subreddit. Reddit also consist on many useful and useless bot which
are kept active in web server and keep running in the reddit API and contain vast variety of
subreddit community in reddit and some bot specially made for specific subreddit like in r/
news bot is made which gives the posted related topic article and information when the bot
is called in the comments of the subreddit post.

Reddit is the main part of our project which is used along with python graphic user
interface maker which made by using tools available in tkinter module. We are able to code
for reddit bot and access reddit by using module praw (The Python Reddit API Wrapper)
which helps us to use reddit API and search through reddit’s subreddit of our wish and run
bot on the subreddit and go through comment of new post and check if any user called for
the bot by using the keyphrase and then the bot reply to the user by script it was made to
reply.

In our project gui was made to display the user request and reply, and send the
shareable link for the post and both the bot in the gui are run simultaneously in the
background of the gui and keep searching if through new comments if any user in any post
is called upon the bot and keep on running till the gui is active, the bots also able to save the
comment id in which they are already posted the reply when called by this the bot avoid to
reply the same comment if run again and avoid same reply in same comment when restarted
when opening the gui.

Graphic user interface was made using tkinter by which we made menu and a small
functional small application type of thing which is just use to display the message from
reddit to the textbox in the gui and send the shareable link and make in act like just a screen
in which bot interaction with user in comment is posted and able to cross check the bot is
properly functioning in the specific subreddit.
Existing System Architecture/Working

The Existing working of reddit bot is by running through web servers which keeps the bot
whole time and keep the bot script running in the subreddit moderators and mostly maintained and
used by moderators to help post filter which can help the subreddit to gets post of quality and avoid
spam posts. Bot also help to make comment section a better place and ban any comment which
break specific subreddit rule.

Most of the bots are just for archive posts and snapshots which are present most of popular
subredddits. There are also bot made by users which they run to make their task easier when using
the reddit and help other users in reddit or to experiment with reddit API and make different types
of bots for making user experience in comment fun and engaging. One subreddit is dedicated to
making bots and testing out different feature which is known as r/RedditDev which only contain
discussion on Reddit API.

Bot made consist of basic tasks or complicated task which are made of many by using different
features of Reddit API, some bot are there in reddit which can be called by user in any comment
sections and give then a parameters to work with and help with reddit bot interaction.

In reddit there are many bots already which exist and many hundreds which are ran by user and
moderators, most of big bots are ran through script in web server and follow the subreddit rules of
function and other user bots may be run by web server or by them on testing purposes.
Problem Definition

For our project as we have to use reddit API praw module to able access subreddit and
comments from reddit it requires our own username, password, client_id, client_secret and agent
user name to proper functioning of our bot and is contain in different file from our project code file
and thus is remain secure.

Our project vulnerability is that if an intruder gets our config file running alongside with
project code then anyone will be not only run the code and run our bots without our consent, then
we will also get all our user information for reddit and able to use bots and might try to make bot
use against reddit rule of bot usage and by which our account can get banned.

Even without our reddit account information, if our project code is able to get in the hand
of someone it is easy to make our bots run through API and making own account and able be get all
client_id of new account and making the bots run through that information.
Objective

 Objective of reddit bot is to replying to comment in which bot is called by its keyphrase

 To save user time by automatic replying to comment and helping subreddit on bot required
task

 Making the gui using tkinter to get all the comments in the single window

 To get the urls of all comments in the single window of gui

 To maintain activity of user on Reddit without being active

Objective of dictionary bot:

 To help other by giving the meaning of the word they asked

 To help user to reply the comment author for the meaning of the word without direct
interaction
Proposed System Architecture/Working

Our system works just by running the code through any code executor and is displayed in
the graphic user interface in which all the bots replied comment and bots reply to post will be
inserted to the textbox area of the gui and the bots will be running in the background in different
threads to avoid the hanging of the gui in between the process of the bot running through reddit
API.

In the code first all the different modules are loaded first and then from different config
file all the reddit username, password is loaded for able to use in python reddit API wrapper and
then first the gui is ran in code when it is executed and the required elements of gui is loaded which
are textbox, menubar and menu bar related task like file, options and about are made for menu
which consist of few others options in each one of them and mainly gui is just use as display screen
for the bot comments display.

As there are two bots in our system which are run each on different threads for better
performance of the graphic user interface in which code are displayed. Both the bots user reddit API
are ran in the background till the gui is active and running and can either be stop due API rate limit
in the reddit API which occurs due to low karma present in a account, while the bots are running a
they run across through a subreddit to find any new comments in the post in which if they are
called, and by changing the subreddit name in the code area the bots are able to run in desired
community or community it is required.

One bot is just greeting bot which reply with just Hello alongside with user name when is
called in any post in the subreddit and then display the message in the gui, other bot is like a
dictionary bot it works similar to anyone who calls it with alongside with any word of which
meaning the user want to know ant the bot reply to them by splitting the comment and finding the
required word meaning and then print the word meaning to the comment user and display in the gui.
Bot also share the comment link to which they replied by which when pasting into browser we can
see.
ER – Diagram
Proposed Technology Stack

Hardware requirements

 Any CPU which have minimum 2 threads or more


 At least any Ram more than 2gb or more
 No graphic card requirement to run the program
 Internet connection is required by wireless or lan means

Software requirements

 The program is able to run in Windows OS.


 Python is required to run the programs
 Different modules is required for the program proper functionality, which are

1. Tkinter
2. Praw
3. Tkinter.scrolledtext
4. From tkinter import messagebox
5. Threading
6. From PyDictionary import PyDictionary
7. Import enchant
Implementation

The above photo gui is made up of using tkinter which is used to display all the user comments to
which the bot has replied and send the comment link by which we can check by opening reddit. The
gui contains textbox area where all the bot comments are displayed and also able to scroll through if
more comment is replied by the bot. The gui also contain menu bar which contain various tools which
can help the user experience using it.

The menu bar option in file contain clear screen and exit commands, similarly the help option contain
detail of Reddit Bot and about developer’s text. The Option contain font and colour options which
help user to customize the interface according to their requirements.

The program also runs bot in background alongside with the gui and runs till the gui is functioning
and both bots run on different thread which help the response and make program run better.

The both bot replied comments and user asked comment is displayed in the gui with the shareable
link, one bot is ‘Hello Bot’ which just greets the user with their username and other bot is wordbot
which gives meaning of the word which the user in comment asked for.
Conclusion

In this project we have demonstrated the basic of how reddit bot is able to run and work
in the to find the comment and reply to it from a specific subreddit and how they are able to
function and alongside we added a graphic user interface made by using tkinter which is used for
displaying the comment to which bot is replied and send us shareable link to which the bot are
replied which the user of program can check and verify through by help of those link.

We made graphic user interface using tkinter and added the feature we thought that might
be able display the bot reply and made it bit user friendly by adding the options of font and colours
to the gui.

We also learned about reddit API praw which helped us to make our reddit bots and run in
the background using threads which we had to learn a bit about before using them and to make our
program response better by making the gui and bots run in different threads.

By making the hello bots we were able to get idea to response to the user who called our
bot and then we made dictionary bot which gives the word meaning of which the user wanted and
were able to get understanding of reddit API.
References

Websites –
https://praw.readthedocs.io/en/latest/
https://docs.python.org/3/library/tkinter.html
https://www.tutorialspoint.com/python/python_gui_programming.htm

Youbtube –
https://youtu.be/YXPyB4XeYLA
https://youtu.be/NRgfgtzIhBQ
https://youtu.be/KX2jvnQ3u60

Reddit-
https://www.reddit.com/r/redditdev?
utm_medium=android_app&utm_source=share
https://www.reddit.com/r/learnpython?
utm_medium=android_app&utm_source=share
Certificates

Kunal S Shetty:

Technology domain course name: Crash Course on Python and HTML, CSS, and JavaScript for

Web Developers.

Management skills course name: Fundamentals of Project Planning and Management and

Introduction to Personal Branding.

Personality development course name: Teamwork Skills Communicating Effectively in Groups.

Business development course name: Google Analytics for Beginners and Advanced Google

Analytics.

Social responsibility course name: Corporate Sustainability. Understanding and Seizing the

Strategic Opportunity.

Omkar D Bhoir:

Technology domain course name: Crash Course on Python and HTML, CSS, and JavaScript for

Web Developers.

Management skills course name: Fundamentals of Project Planning and Management and

Introduction to Personal Branding.

Personality development course name: Teamwork Skills Communicating Effectively in Groups.

Business development course name: Google Analytics for Beginners and Advanced Google

Analytics.

Social responsibility course name: Corporate Sustainability. Understanding and Seizing the

Strategic Opportunity.

You might also like