Last active
September 10, 2022 12:40
-
-
Save odunola499/253b8bfb2edd395525294d86bc8e4437 to your computer and use it in GitHub Desktop.
Medium article on extracting reddit data
This file contains 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
#import modules | |
import os | |
import requests #to send our requests through the api | |
import pandas as pd #to create a pandas dataframe and and save our data in csv format | |
#get client_id, secret_key, username and password from a text document in the current working directory | |
with open('key.txt') as f: | |
data.readlines() | |
client_id = data[0].strip() | |
secret_key = data[1].strip() | |
username = data[2].strip() | |
password = data[3].strip() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment