Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(46) | Call(30) | Derive(0) | Import(16)
thanks to http://snippets.dzone.com/posts/show/4569
def htmlentities_decode(string): """ thanks to http://snippets.dzone.com/posts/show/4569 """ entity_re = re.compile(r'&(#?)(x?)(\d{1,5}|\w{1,8});') return entity_re.subn(substitute_entity, string)[0]
from urllib import quote_plus from baas.core.plugins import Plugin from baas.core.helpers import strip_tags, xmlify, htmlentities_decode, load_feed class Twingly(Plugin):
result += ': %s' % desc result += '%s\n' % row["link"] result = htmlentities_decode(result) else: result += 'No sites found!'
desc = row["summary"] if len(row["summary"]) > 0 else None if desc: result += "%s<br/>" % xmlify(htmlentities_decode(desc)) result += '<br/>' else:
result += ': %s' % desc result += '%s\n' % row["link"] result = htmlentities_decode(result) else: result += 'No sites found!'
src/b/a/baas-HEAD/baas/plugins/twingly.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_feed class Twingly(Plugin):
result += ': %s' % desc result += '%s\n' % row["link"] result = htmlentities_decode(result) else: result += 'No sites found!'
desc = row["summary"] if len(row["summary"]) > 0 else None if desc: result += "%s<br/>" % xmlify(htmlentities_decode(desc)) result += '<br/>' else:
result += ': %s' % desc result += '%s\n' % row["link"] result = htmlentities_decode(result) else: result += 'No sites found!'
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:
if i: result = " <br/><br/>" result += '<b>%s</b>:<br/><br/>' % (htmlentities_decode(i.get('city')))#, i.get('current_date_time')) c = data.get('current') if c.get('condition'): result += '%s, ' % htmlentities_decode(c.get('condition')) result += '%s°C/%s°F, %s<br/>%s<br/><br/>' % ( c.get('temp_c'), c.get('temp_f'), htmlentities_decode(c.get('humidity')),
c.get('temp_f'), htmlentities_decode(c.get('humidity')), htmlentities_decode(c.get('wind_condition')) ) f = data.get('forecast')
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:
if i: result = " <br/><br/>" result += '<b>%s</b>:<br/><br/>' % (htmlentities_decode(i.get('city')))#, i.get('current_date_time')) c = data.get('current') if c.get('condition'): result += '%s, ' % htmlentities_decode(c.get('condition')) result += '%s°C/%s°F, %s<br/>%s<br/><br/>' % ( c.get('temp_c'), c.get('temp_f'), htmlentities_decode(c.get('humidity')),
c.get('temp_f'), htmlentities_decode(c.get('humidity')), htmlentities_decode(c.get('wind_condition')) ) f = data.get('forecast')
src/b/a/baas-0.2.2/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:
if row.get('publisher'): title = "%s: %s" % (row.get('publisher'), title) result += "%s - %s\n" % (htmlentities_decode(title), row['unescapedUrl']) else: result += 'No hits found!'
if row.get('publisher'): title = "%s: %s" % (row.get('publisher'), title) title = xmlify(htmlentities_decode(title)) result += '<a href="%s">%s</a><br/><br/>' % (xmlify(row['unescapedUrl']), title) else:
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:
if row.get('publisher'): title = "%s: %s" % (row.get('publisher'), title) result += "%s - %s\n" % (htmlentities_decode(title), row['unescapedUrl']) else: result += 'No hits found!'
if row.get('publisher'): title = "%s: %s" % (row.get('publisher'), title) title = xmlify(htmlentities_decode(title)) result += '<a href="%s">%s</a><br/><br/>' % (xmlify(row['unescapedUrl']), title) else:
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:
if row.get('publisher'): title = "%s: %s" % (row.get('publisher'), title) result += "%s - %s\n" % (htmlentities_decode(title), row['unescapedUrl']) else: result += 'No hits found!'
if row.get('publisher'): title = "%s: %s" % (row.get('publisher'), title) title = xmlify(htmlentities_decode(title)) result += '<a href="%s">%s</a><br/><br/>' % (xmlify(row['unescapedUrl']), title) else:
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:
if row.get('publisher'): title = "%s: %s" % (row.get('publisher'), title) result += "%s - %s\n" % (htmlentities_decode(title), row['unescapedUrl']) else: result += 'No hits found!'
if row.get('publisher'): title = "%s: %s" % (row.get('publisher'), title) title = xmlify(htmlentities_decode(title)) result += '<a href="%s">%s</a><br/><br/>' % (xmlify(row['unescapedUrl']), title) else:
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:
''' if data.get('text'): result = '%s (%s => %s)' % (htmlentities_decode(data.get('text')), data.get('detected_lang'), data.get('lang')) else: result = 'Text translation failed'
if data.get('text'): result += '<b>%s</b> <i>(%s => %s)</i>' \ % (xmlify(htmlentities_decode(data.get('text'))), data.get('detected_lang'), data.get('lang')) else:
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:
''' if data.get('text'): result = '%s (%s => %s)' % (htmlentities_decode(data.get('text')), data.get('detected_lang'), data.get('lang')) else: result = 'Text translation failed'
if data.get('text'): result += '<b>%s</b> <i>(%s => %s)</i>' \ % (xmlify(htmlentities_decode(data.get('text'))), data.get('detected_lang'), data.get('lang')) else:
1 | 2 Next