老师我一运行 就出现这样的usage: C:\\Desktop\pdfminer3k-1.3.1\tools\pdf2txt.py [-d] [-p pagenos]
[-m maxpages] [-P password] [-o output] [-C] [-n] [-A] [-V] [-M char_margin] [-L
line_margin] [-W word_margin] [-F boxes_flow] [-Y layout_mode] [-O output_dir]
[-t text|html|xml|tag] [-c codec] [-s scale] file ...
[-m maxpages] [-P password] [-o output] [-C] [-n] [-A] [-V] [-M char_margin] [-L
line_margin] [-W word_margin] [-F boxes_flow] [-Y layout_mode] [-O output_dir]
[-t text|html|xml|tag] [-c codec] [-s scale] file ...
2016-10-06
import re # 通过正则表达式查找a标签中的链接
pattern = '<a\s+.*href=["\'](.+)["\']\s*.*/*>'
href = re.findall(pattern,html)
pattern = '<a\s+.*href=["\'](.+)["\']\s*.*/*>'
href = re.findall(pattern,html)
2016-09-30
确实测试中无法存储的错误出在这一句:with connection.cursor() as cursor
表面上是出现在这一句:cursor.execute(sql,('**','**'))
如楼下所言,改成如下后正常存储 cur = connection.cursor()
测试环境:py2.7 mysql5.7.15
表面上是出现在这一句:cursor.execute(sql,('**','**'))
如楼下所言,改成如下后正常存储 cur = connection.cursor()
测试环境:py2.7 mysql5.7.15
2016-09-25