Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/s/e/seo-ranking-engine-HEAD/ranking_engine/ranking.py   seo-ranking-engine(Download)
import base64
from django.utils import simplejson as json
from utils import urlfetch_with_cache
 
import random
        start = i * num
        api_url = base_api_url + "start=" + unicode(start) + "&q=" +  urllib.quote_plus(keyword.encode("UTF-8"))
        result = urlfetch_with_cache(api_url, 3600, 600)
        if result['status_code'] != 200:
            raise Exception("Invalid response (url = <" + google_url + ">, status code = " + unicode(result['status_code']) + " and content = <" + unicode(result['content']) + ">")
        start = i * num
        api_url = base_api_url + "$skip=" + unicode(start) + "&$top=" +  unicode(num)
        result = urlfetch_with_cache(api_url, 3600, 600, headers)
        if result['status_code'] != 200:
            raise Exception("Invalid response (url = <" + api_url + ">, status code = " + unicode(result['status_code']) + " and content = <" + unicode(result['content']) + ">")