
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
reddit2text
Advanced tools
reddit2text is the Python library designed to effortlessly transform any Reddit thread into clean, readable text data.
Perfect for feeding to an LLM, performing textual/data analysis, or simply archiving for offline use, reddit2text offers a straightforward interface to access and convert content from Reddit.
Have a Feature Idea?
Simply open an issue on github and tell us what should be added to the next release!
Easy install using pip
pip3 install reddit2text
First, you need to create a Reddit app to get your client_id and client_secret. Follow the instructions on Reddit's API documentation to set up your application.
Then, replace the client_id, client_secret, and user_agent with your credentials.
The user agent can be anything you like, but we recommend following this convention according to Reddit's guidelines: '<app type>:<app name>:<version> (by <your username>)'
Here's an example:
from reddit2text import Reddit2Text
r2t = Reddit2Text(
# example credentials
client_id='123abc',
client_secret='123abc',
user_agent='script:my_app:v1.0 (by u/reddit2text)'
)
# The URL must have the post ID after the /comments/ to work, e.g. `1buyr0g`
URL = 'https://www.reddit.com/r/MadeMeSmile/comments/1buyr0g/ryan_reynolds_being_wholesome/'
output = r2t.textualize_post(URL)
print(output)
Here is an example (truncated) output from the above code! https://pastebin.com/mmHFJtcc
None or -1 to include all.| to mimic reddit.r2t = Reddit2Text(
# credentials ...
max_comment_depth=3, # all comment chains will be limited to a max of 3 replies
comment_delim='#' # each comment level will be preceded by multiples of this string
)
Contributions to reddit2text are welcome. Please submit pull requests or issues to our GitHub repository.
reddit2text is released under the MIT License. See the LICENSE file for more details.
FAQs
Convert Reddit posts to text
We found that reddit2text demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.