Skip to content

Instantly share code, notes, and snippets.

@fallingfree
Last active December 14, 2015 22:39
Show Gist options
  • Save fallingfree/5160153 to your computer and use it in GitHub Desktop.
Save fallingfree/5160153 to your computer and use it in GitHub Desktop.
douban api with requests
# -*- coding:utf-8 -*-
import reuqests
def douban_api(subject_id):
# subject_id = 5308265
r = requests.get('http://api.douban.com/v2/movie/%d', subject_id)
#r = requests.get('http://api.douban.com/v2/movie/5308265')
d = r.json()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment