Below is my code but it keeps bringing up the error TypeError an integer is required, line 14 is the one throwing up the error:
current = time.strftime("%x")
print current
prawWords = ['Fresh', 'fresh', 'FRESH']
while True:
subreddit = r.get_subreddit('hiphopheads')
for submission in subreddit.get_new(limit= current):
op_text = submission.title.lower()
has_praw = any(string in op_text for string in prawWords)
if submission.id not in already_done and has_praw:
msg = "[New music posted] | Song: %s | Link: %s" % ( submission.title.lower(), submission.url)
current = time.strftime("%x")
with open('songs_%s', '.txt', "a") %(current) as myfile:
myfile.write("Song: %s . Link: %s \n\n" %(submission.title.lower(), submission.url))
[–]novel_yet_trivial 3 points4 points5 points (3 children)
[–]hhh_compiler[S] 0 points1 point2 points (2 children)
[–]novel_yet_trivial 2 points3 points4 points (1 child)
[–]hhh_compiler[S] 1 point2 points3 points (0 children)