Open Live Writer 代码插入插件测试
#-*-coding:utf-8-*-
import urllib
import json
import sys
import ssl
ssl._create_default_https_context = ssl._create_unverified_context def gettype(number):#定义取快递类型函数
def getlist():#取快递类型列表
req = urllib.urlopen('http://www.kuaidi100.com/autonumber/autoComNum?text=%d' %number)
html = req.read()
dict_html = json.loads(html)
return dict_html['auto']
for i in getlist():
type = i['comCode']
return type def getprocess(url):#定义获取快递进度函数
req = urllib.urlopen(url)
html = req.read()
#type = sys.getfilesystemencoding() #取文件系统编码类型
#html = html.decode('utf-8').encode(type) #utf-8解码 由于解码后和json里面解码冲突,故注释掉此段代码
dict_info =json.loads(html)
return dict_info['data'] number= input(u"请输入快递单号:") type = gettype(number)#获取快递类型 Address = 'http://www.kuaidi100.com/query?type=%s&postid=%d&id=1&valicode=&temp=0.33020057185034335' %(type,number)
for i in getprocess(Address):
print i['ftime'] + i['context']
测试一下,代码功能为查快递。
Open Live Writer 代码插入插件测试的更多相关文章
- 发布Live Writer代码着色插件CNBlogs.CodeHighlighter
在解决了使用Windows Live Writer发博所遇到的"建分类.加标签.写摘要"与"设置EntryName"的四个问题之后,我们趁热打铁,解决了第五个问 ...
- Windows Live Writer代码高亮插件对比
一.Paste ASVisual Studio Code 参考:http://www.cnblogs.com/mikelij/archive/2010/11/13/1876199.html 插件下载: ...
- open live writer 代码着色插件
插件地址1: http://files.cnblogs.com/files/zsy/OpenLiveWriter.CNBlogs.SourceCode.zip 下载,解压,把里面的文件放到最新的 ap ...
- Windows Live Writer加载代码着色插件步骤
博客园内置支持SyntaxHighlighter代码着色,代码着色语法:<pre class='brush:编程语言'>代码</pre>. 需要注意的是:如何你使用Syntax ...
- 用 Windows Live Writer 和 SyntaxHighlighter 插件写高亮代码
博客园内置支持SyntaxHighlighter代码着色,代码着色语法:<pre class='brush:编程语言'>代码</pre>. 需要注意的是:如何你使用Syntax ...
- 在Windows Live Writer中插入C# code
平时都是用Windows Live Writer写博客,发布博客.遇到需要插入代码都是先在notepad中写好,或者是拷贝到notepad,再从notepad中拷到Windows Live Write ...
- Open Live Writer 显示不出来代码着色插件解决办法
下载地址: Open Live Writer 插件更新 下载后要把下面这5个文件,全部解除锁定(右键属性打开) Memento.OLW.Plugins.dll OLWPlugins.css OpenL ...
- OLW (Open Live Writer)安装代码高亮插件方法(简明)
1.首先下载OLW代码高亮插件,请点击--->OLW代码高亮插件 2.在你安装OLW的目录下(顺便说一下默认的安装目录为C:\Users\你的用户名\AppData\Local\OpenLive ...
- open live write 代码高亮插件的配置和使用
第一步:下载open live writer插件,下载地址:http://www.cnblogs.com/memento/p/5995173.html 第二步:找到open live writer的安 ...
随机推荐
- Ubuntu64位安装Adobe Reader 9.5.5
Aodbe Reader在Linux下的效果比Foxit Reader(福昕阅读器)要好一些,尤其对于中文文档而言.本文介绍Adobe Reader在Ubuntu下的安装,文章<Ubuntu12 ...
- struts2 eclipse集成jdk与tomcat (2)
Eclipse 中集成jdk与tomcat 1. 首次打开Eclipse为让你选择工作空间,选择合适即可. 添加JDK (1) 在Eclipse的菜单中选择window选项,单击 perference ...
- 【BZOJ3544】[ONTAK2010]Creative Accounting 前缀和+set
[BZOJ3544][ONTAK2010]Creative Accounting Description 给定一个长度为N的数组a和M,求一个区间[l,r],使得(\sum_{i=l}^{r}{a_i ...
- 文件查找工具Everything小工具的使用
Everything 小工具的使用: 首先它是一款基于名称实时定位文件和目录的搜索工具,有以下几个优点: 快速文件索引 快速文件搜索 较低资源占用 轻松分享文件索引 实时跟踪文件更新 通过使用ever ...
- 题解 P3805 【【模板】manacher算法】
题解 P3805 [[模板]manacher算法] 我们先看两个字符串: ABCCBA ABCDCBA 显然这两字符串是回文的 然而两个串的对称中心的特性不同,第一个串,它的对称中心在两个C中间,然而 ...
- [容易]Fizz Buzz 问题
题目来源:http://www.lintcode.com/zh-cn/problem/fizz-buzz/
- Python正则表达式Cheat sheet
1.来源: Python Regular Expressions Cheat Sheet 2.内容: Special Characters ^ | Matches the expression to ...
- PAT 甲级 1104. Sum of Number Segments (20) 【数学】
题目链接 https://www.patest.cn/contests/pat-a-practise/1104 思路 最容易想到的一个思路就是 遍历一下所有组合 加一遍 但 时间复杂度 太大 会超时 ...
- image auto fix the View
image: { flex: 1, width: null, height: null, resizeMode: 'contain' }
- 使用pip安装第三方库报错记录
今天在使用pycharm导入第三方库的时候,报了好多超时错误,还有标题中的找不到版本,应该是网络的原因,记录下解决的办法: raise ReadTimeoutError(self._pool, Non ...