This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for year in range(2021, 2038): | |
for submission in reddit.subreddit('futurology').search(str(year), sort='relevance'): | |
print(submission.title) | |
print 'https://www.reddit.com'+submission.permalink | |
# Append to the file here | |
filename = "DATA/prediction.txt" | |
# Append the comments | |
with io.open(filename, 'a', encoding='utf-8') as file: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Primary Components | |
import os | |
from python.bottle import route, run, static_file, template, view, post, request, error | |
import sqlite3 as lite | |
import sys | |
import json | |
import pymongo # import Connection | |
# OAuth components |