12 2014 档案

摘要: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 阅读(320) 评论(0) 推荐(0)
摘要:用tornado做了一个简单的页面。结果页面中的css被加载了,但是没有效果。用谷歌浏览器调试,说是Resource interpreted as Stylesheet but transferred with MIME type application/x-css。大概意思就是css文件被识别为样... 阅读全文
posted @ 2014-12-19 14:40 稻草人.cn 阅读(21597) 评论(4) 推荐(0)
摘要:直接设置即可,比如:IMAGE_SAVE_PATH = 'd:/data/'这样引用: 阅读全文
posted @ 2014-12-12 17:57 稻草人.cn 阅读(1363) 评论(0) 推荐(0)
摘要:scrapy下载图片到指定路径,可以通过覆写ImagesPipeline 的file_path方法来实现。但是,前提是:在settings.py不能设置IMAGES_STORE。一旦设置了IMAGES_STORE属性,那么覆写file_path即使成功,也不会改变图片的保存路径。 阅读全文
posted @ 2014-12-12 17:36 稻草人.cn 阅读(873) 评论(0) 推荐(0)