Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import csv
- import praw
- import re
- r = praw.Reddit(client_id="",client_secret="",username="",password="",user_agent="")
- submission = r.submission(id="")
- with open("file.csv", "r", encoding="utf-8") as file:
- apps_reader = csv.reader(file)
- for i, row in enumerate(apps_reader):
- if i == 0:
- headings = row
- continue
- text = ""
- for j, col in enumerate(row):
- content = " " + re.sub("\n", "\n ", col)
- text += f"# {headings[j]}\n\n{content}\n\n"
- print(text)
- submission.reply(text)
Add Comment
Please, Sign In to add comment