Skip to content

Instantly share code, notes, and snippets.

@bsullins
Created July 31, 2013 23:05
Show Gist options
  • Save bsullins/6127010 to your computer and use it in GitHub Desktop.
Save bsullins/6127010 to your computer and use it in GitHub Desktop.
import sys
import bitly_api
import os
import datetime
from datetime import date
from config import config
import time
#connect to bitly
conn_btly = bitly_api.Connection(access_token=config['ACCESS_TOKEN'])
#get links
pop_links = conn_btly.user_popular_links()
print 'got links!'
#links loop
for pop_link in pop_links:
#link = conn_btly.user_link_history(pop_link['link'], limit=1)
link = conn_btly.link_info(pop_link['link'])
print link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment