Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(22) | Call(10) | Derive(0) | Import(12)
loads an url
def load_url(url): """ loads an url """ req = urllib2.Request(url) response = urllib2.urlopen(req).read() return response
from urllib import urlencode, quote_plus from baas.core.plugins import Plugin from baas.core.helpers import strip_tags, xmlify, htmlentities_decode, load_url try:
api_url = 'http://ajax.googleapis.com/ajax/services/search/'+mode+'?%s' % (url_params) response = load_url(api_url) api_response = simplejson.loads(response) if api_response.get('responseStatus') == 200:
src/b/a/baas-0.2.2/baas/plugins/gsearch.py baas(Download)
from urllib import urlencode, quote_plus from baas.core.plugins import Plugin from baas.core.helpers import strip_tags, xmlify, htmlentities_decode, load_url try:
api_url = 'http://ajax.googleapis.com/ajax/services/search/'+mode+'?%s' % (url_params) response = load_url(api_url) api_response = simplejson.loads(response) if api_response.get('responseStatus') == 200:
src/b/a/baas-0.2.2/baas/plugins/translate.py baas(Download)
from urllib import quote_plus from baas.core.plugins import Plugin from baas.core.helpers import strip_tags, xmlify, htmlentities_decode, load_url try:
api_url = 'http://www.google.com/uds/Gtranslate?context=22&q=%s&langpair=%s|%s&key=notsupplied&v=1.0' % (url_term, source_lang, target_lang) response = load_url(api_url) api_response = simplejson.loads(response)
src/b/a/baas-HEAD/baas/plugins/maemo.py baas(Download)
from urllib import urlencode, quote_plus from baas.core.plugins import Plugin from baas.core.helpers import strip_tags, xmlify, htmlentities_decode, load_url try:
api_url = 'http://ajax.googleapis.com/ajax/services/search/'+mode+'?%s' % (url_params) response = load_url(api_url) api_response = simplejson.loads(response) if api_response.get('responseStatus') == 200:
src/b/a/baas-HEAD/baas/plugins/gsearch.py baas(Download)
from urllib import urlencode, quote_plus from baas.core.plugins import Plugin from baas.core.helpers import strip_tags, xmlify, htmlentities_decode, load_url try:
api_url = 'http://ajax.googleapis.com/ajax/services/search/'+mode+'?%s' % (url_params) response = load_url(api_url) api_response = simplejson.loads(response) if api_response.get('responseStatus') == 200:
src/b/a/baas-HEAD/baas/plugins/translate.py baas(Download)
from urllib import quote_plus from baas.core.plugins import Plugin from baas.core.helpers import strip_tags, xmlify, htmlentities_decode, load_url try:
api_url = 'http://www.google.com/uds/Gtranslate?context=22&q=%s&langpair=%s|%s&key=notsupplied&v=1.0' % (url_term, source_lang, target_lang) response = load_url(api_url) api_response = simplejson.loads(response)
src/b/a/baas-0.2.2/baas/plugins/weather.py baas(Download)
from xml.etree import ElementTree from baas.core.plugins import Plugin from baas.core.helpers import strip_tags, htmlentities_decode, load_url try:
api_url = 'http://www.google.de/ig/api?%s' % (url_term) response = load_url(api_url) if response: response = self._fix_invalid_xml(response)
src/b/a/baas-HEAD/baas/plugins/weather.py baas(Download)
from xml.etree import ElementTree from baas.core.plugins import Plugin from baas.core.helpers import strip_tags, htmlentities_decode, load_url try:
api_url = 'http://www.google.de/ig/api?%s' % (url_term) response = load_url(api_url) if response: response = self._fix_invalid_xml(response)
src/b/a/baas-0.2.2/baas/core/yqlapi.py baas(Download)
# GPL - see License.txt for details import urllib from baas.core.helpers import load_url try:
final_url += '&env='+urllib.quote_plus('store://datatables.org/alltableswithkeys') response = load_url(final_url) api_data=simplejson.loads(response)
src/b/a/baas-HEAD/baas/core/yqlapi.py baas(Download)
# GPL - see License.txt for details import urllib from baas.core.helpers import load_url try:
final_url += '&env='+urllib.quote_plus('store://datatables.org/alltableswithkeys') response = load_url(final_url) api_data=simplejson.loads(response)
1 | 2 Next