摘要: 安装以下包: "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "1.0.0-preview2-update1", "Microsoft.VisualStudio.Web.CodeGeneration.Core": "1.0.0-preview2-up 阅读全文
posted @ 2016-09-18 11:46 稻草人.cn 阅读(1891) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-05-20 15:57 稻草人.cn 阅读(1808) 评论(0) 推荐(0) 编辑
摘要: input 控件必须有name属性和value属性。 阅读全文
posted @ 2015-01-07 11:14 稻草人.cn 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 下载图片 阅读全文
posted @ 2015-01-04 14:12 稻草人.cn 阅读(991) 评论(0) 推荐(0) 编辑
摘要: print(time.strftime("%Y%m%d%H%M%S", time.localtime()))或者print (time.strftime("%Y%m%d%H%M%S"))得到:20141223100840 阅读全文
posted @ 2014-12-23 10:16 稻草人.cn 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 用tornado做了一个简单的页面。结果页面中的css被加载了,但是没有效果。用谷歌浏览器调试,说是Resource interpreted as Stylesheet but transferred with MIME type application/x-css。大概意思就是css文件被识别为样... 阅读全文
posted @ 2014-12-19 14:40 稻草人.cn 阅读(21538) 评论(4) 推荐(0) 编辑
摘要: 直接设置即可,比如:IMAGE_SAVE_PATH = 'd:/data/'这样引用: 阅读全文
posted @ 2014-12-12 17:57 稻草人.cn 阅读(1348) 评论(0) 推荐(0) 编辑
摘要: scrapy下载图片到指定路径,可以通过覆写ImagesPipeline 的file_path方法来实现。但是,前提是:在settings.py不能设置IMAGES_STORE。一旦设置了IMAGES_STORE属性,那么覆写file_path即使成功,也不会改变图片的保存路径。 阅读全文
posted @ 2014-12-12 17:36 稻草人.cn 阅读(856) 评论(0) 推荐(0) 编辑
摘要: Item 字段名必须是image_urls即:image_urls = Field()item['image_urls']的类型是一个list。item['image_urls'] = "http://some.jpg" 是不行的。会有如下错误: Traceback (most recent cal... 阅读全文
posted @ 2014-11-19 10:19 稻草人.cn 阅读(866) 评论(0) 推荐(0) 编辑
摘要: 解决办法:先去回车:d3 = d2.replace('\n', '')再把单引号替换为双引号。d3 = d3.replace("'", '"') 阅读全文
posted @ 2014-11-12 16:21 稻草人.cn 阅读(1500) 评论(0) 推荐(0) 编辑