def get_background(): s = 'http://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1' resp = fetch_url(s) d = json.loads(resp[1]) bg_url=d['images'][0]['url'] #bg_url = 'http://s.cn.bing.net/az/hprichbg/rb/HerzliyaIsrael_ZH-CN12724786713_1366x768.jpg' return bg_url
def bing_desktop(): s = 'http://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1' resp = fetch_url(s) response.set_content_type(resp[0]) return resp[1]