06 2020 档案
摘要:import requests as r import re,encodings import time from lxml import etree def pa( url,name): headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0
阅读全文
摘要:正则表达式是一个特殊的字符序列,它能帮助你方便的检查一个字符串是否与某种模式匹配。 re 模块使 Python 语言拥有全部的正则表达式功能。 re 模块也提供了与这些方法功能完全一致的函数,这些函数使用一个模式字符串做为它们的第一个参数。 compile 函数根据一个模式字符串和可选的标志参数生成
阅读全文
摘要:本次爬的照片网址为:http://image.baidu.com/search/index?tn=baiduimage&ps=1&ct=201326592&lm=-1&cl=2&nc=1&ie=utf-8&word=%E6%9D%A8%E5%B9%82 进去后,F12进入开发人员选项,笔者用的是Ch
阅读全文