Skip to content

Instantly share code, notes, and snippets.

@odunola499
Last active September 10, 2022 12:40
Show Gist options
  • Save odunola499/253b8bfb2edd395525294d86bc8e4437 to your computer and use it in GitHub Desktop.
Save odunola499/253b8bfb2edd395525294d86bc8e4437 to your computer and use it in GitHub Desktop.
Medium article on extracting reddit data
#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