2016年11月22日

摘要: 例: 输出<span class="w-txt">分享</span>中的文本”分享“ contents = bsObj.find_all("span",{"class":"w-txt"}) for content in contents: print(content.get_text()) 阅读全文
posted @ 2016-11-22 21:38 烁宝宝 阅读(601) 评论(0) 推荐(0)
 
摘要: pyodbc不支持使用%,应该使用? 如: Sql插入语句cur.execute("INSERT INTO bb VALUES (?,?,?)","s","c","6") 阅读全文
posted @ 2016-11-22 20:37 烁宝宝 阅读(119) 评论(0) 推荐(0)
 
摘要: 中文字符串前面加u 如: title =u"你好" contents = "m" ids="13" cur.execute("INSERT INTO bb VALUES (?,?,?)",title,contents,ids) 阅读全文
posted @ 2016-11-22 20:36 烁宝宝 阅读(651) 评论(0) 推荐(0)