爬虫项目实战(二)
(一)爬蟲實戰之Xpath數據解析
1)、XPath介紹
XPath,全稱XML Path Language,即XML路徑語言,它是一門在XML文檔中查找信息的語言。最初是用來搜尋XML文檔的,但同樣適用于HTML文檔的搜索。所以在做爬蟲時完全可以使用XPath做相應的信息抽取。
2)、XPath的常用規則:
這里列出了XPath的常用匹配規則,示例如下: .//title[@lang='eng‘],這是一個XPath規則,代表的是選擇所有名稱為title,同時屬性lang的值為eng的節點,后面會通過Python的lxml庫,利用XPath進行HTML的解析。
3)、安裝
windows-> python3環境下: pip install lxml
linux環境下: pip3 install lxml
4)、實例
注意:Chrome中的源代碼無法直接復制,
小插曲:如何復制Chrome瀏覽器中的源代碼
現在很多網頁直接查看源代碼是看不到完整的源代碼的,有些網頁往下翻會不停的加載新內容,就算最終全部加載完了,源代碼中也不會顯示網頁的全部內容。只有按F12或ctrl+shift+i才能看到所有元素的源代碼。
從上圖可以看出來,這些元素的源代碼默認是無法選中進行一次性復制的,只能一個一個元素復制。下面就分享一下復制整個頁面的源代碼的方法。
a、如下圖,找到頂部的html標簽,然后點擊鼠標右鍵后選擇Edit as HTML
b、現在按ctrl+a全部選中就可以復制到剪貼板了。
c、如果覺得格式有些亂,可通過網上的在線html工具進行在線格式化
https://tool.oschina.net/codeformat/html
問題解決!!!
第一種方式:
第二種方式:
from lxml import etree # 第二種方式,讀取一個html文件并解析 html = etree.parse('./text.html', etree.HTMLParser()) # print(html) # 提取數據 # r = html.xpath("/html/body/ul/li/a/text()") # print(r) #執行結果 ['java工程師', 'Python工程師', 'AI工程師']#范圍更廣,獲取頁面中所有li里面的數據 # r = html.xpath("//li/a/text()") # print(r) #執行結果 ['java工程師', 'Python工程師', 'AI工程師', '猿叔', '猿嬸', '猿姐']#提取指定標簽中的數據 h = html.xpath('//div[@class="teacher"]/ul/li/a/text()') print(h) #執行結果['猿叔', '猿嬸', '猿姐']#獲取指定標簽的屬性 r = html.xpath('//div[@class="teacher"]//li/a/@href') print(r) #執行結果['/1/', '/2/', '/3/'] res = list(zip(h,r)) print(res) #執行結果[('猿叔', '/1/'), ('猿嬸', '/2/'), ('猿姐', '/3/')] import requests from lxml import etree #封裝類,進行學習猿地的登錄和訂單的獲取 class LMonkey():#登陸請求地址loginurl = 'https://www.lmonkey.com/login'# 帳戶中心地址orderurl = 'https://www.lmonkey.com/my/order'# 請求頭headerheaders = {'User - agent': 'Mozilla / 5.0(Linux; Android 6.0;Nexus5Build / MRA58N) AppleWebKit / 537.36(KHTML, like Gecko) Chrome / 83.0.4103.116Mobile Safari / 537.36'}# 請求對象req = None#token口令token = ''#訂單號ordercode = 0# 初始化方法def __init__(self):#請求對象的初始化self.req = requests.session()if self.getlogin():if self.postlogin():self.getorder()# get登陸頁面,獲取_tokendef getlogin(self):# 1、get請求login頁面,設置cookie獲取_tokenres = self.req.get(url=self.loginurl,headers=self.headers)if res.status_code == 200:print('get登錄頁面請求成功')html = etree.HTML(res.text)self.token = html.xpath('//input[@name="_token"]/@value')[0]print('token獲取成功')return Trueelse:print('請求錯誤')#post請求登錄,設置cookiedef postlogin(self):uname = input('手機號:')passw = input('密碼:')data = {'_token':self.token,'username':uname,'password':passw}#發起post請求res = self.req.post(url=self.loginurl,headers=self.headers,data=self.data)if res.status_code == 200 or res.status_code == 302:print('登陸成功')#請求訂單數據#get請求帳戶中心,獲取默認訂單號def getorder(self):# 3、get請求帳戶中心,獲取默認訂單號res = self.req.get(url=self.orderurl,headers=self.headers,)if res.status_code == 200:print("帳戶中心請求成功,正在解析數據")html = etree.HTML(res.text)r = html.xpath('//div[@class="avatar-content"]//small/text()')print(r)self.ordercode = robj = LMonkey() # obj.getlogin() # obj.postlogin()#1、get請求login頁面,設置cookie獲取_token#2、post請求,提交登陸數據,進行登陸,并設置cookie#3、get請求帳戶中心,獲取默認訂單號 import requests,json from lxml import etreeclass Yq():#請求的地址 猿著url = 'https://www.lmonkey.com/essence'#定義請求頭信息headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36'}#爬取的數據data = ''#存儲數據filepath = './yq.json'#初始化def __init__(self):#發送請求res = requests.get(url=self.url,headers=self.headers)if res.status_code == 200:#請求的內容寫入文件with open('./yq.html','w',encoding='utf-8') as fp:fp.write(res.text)if self.pasedata():self.writedata()#解析數據def pasedata(self):#解析數據html = etree.parse('./yq.html',etree.HTMLParser())#提取數據 作者 文章標題 文章地址urlauthor = html.xpath('//div[contains(@class,"old_content")]//div[contains(@class,"list-group-item-action")]//strong/a/text()')titles = html.xpath('//div[contains(@class,"old_content")]//div[contains(@class,"flex-fill")]//div/text()')titleurl = html.xpath('//div[contains(@class,"old_content")]//div[contains(@class,"flex-fill")]//a/@href')#print(*zip(author,titles,titleurl))#運行結果('xxyd_h5x', 'JetBrains開發工具正版授權領取', 'https://www.lmonkey.com/t/lpLmQeKLg') ('IT頭條', '面向回家編程!GitHub標星兩萬的”Python搶票教程”,我們先幫你跑了一遍', 'https://www.lmonkey.com/t/lpLmQeKLg') ('duke', 'Python教程-一文讀懂運算和運算符', 'https://www.lmonkey.com/t/lpLmQeKLg') ('dragonsz', 'CentOS7 下使用 rsync+sersync 配置文件自動同步', 'https://www.lmonkey.com/t/user/15') ('qingqi', 'Python 教程-代碼測試', 'https://www.lmonkey.com/t/2zLAPzMyW') ('jhxspy', 'Python教程-強制數據類型轉換', 'https://www.lmonkey.com/t/2zLAPzMyW') ('xxyd_python', 'Python 教程-從變量開始', 'https://www.lmonkey.com/t/2zLAPzMyW') ('IT頭條', 'Python 教程-Python 安裝', 'https://www.lmonkey.com/t/2zLAPzMyW') ('IT頭條', 'Python 教程-了解Python', 'https://www.lmonkey.com/t/2zLAPzMyW') ('GaiJoon', '喊話 JavaScript 開發者:玩 DOM 也要專業范兒', 'https://www.lmonkey.com/t/2zLAPzMyW') ('IT頭條', '1000 行 Python 代碼腳本 bug,或影響上百篇學術論文', 'https://www.lmonkey.com/t/2zLAPzMyW') ('IT頭條', '生產環境下的LAMP環境搭建', 'https://www.lmonkey.com/t/user/168547') ('王炸', 'Golang語言的主要特性與發展的環境和影響因素', 'https://www.lmonkey.com/t/G5yvRWXyp') ('王炸', '分享 10 個有用的 Laravel 5.8 集合輔助方法', 'https://www.lmonkey.com/t/G5yvRWXyp')# 整理數據data = []for i in range(0,len(author)):res = {'author':author[i],'title':titles[i],'url':titleurl[i]}data.append(res)# print(data)#運行結果[{'author': 'xxyd_h5x', 'title': 'JetBrains開發工具正版授權領取', 'url': 'https://www.lmonkey.com/t/lpLmQeKLg'}, {'author': 'IT頭條', 'title': '面向回家編程!GitHub標星兩萬的”Python搶票教程”,我們先幫你跑了一遍', 'url': 'https://www.lmonkey.com/t/lpLmQeKLg'}, {'author': 'duke', 'title': 'Python教程-一文讀懂運算和運算符', 'url': 'https://www.lmonkey.com/t/lpLmQeKLg'}, {'author': 'dragonsz', 'title': 'CentOS7 下使用 rsync+sersync 配置文件自動同步', 'url': 'https://www.lmonkey.com/t/user/15'}, {'author': 'qingqi', 'title': 'Python 教程-代碼測試', 'url': 'https://www.lmonkey.com/t/2zLAPzMyW'}, {'author': 'jhxspy', 'title': 'Python教程-強制數據類型轉換', 'url': 'https://www.lmonkey.com/t/2zLAPzMyW'}, {'author': 'xxyd_python', 'title': 'Python 教程-從變量開始', 'url': 'https://www.lmonkey.com/t/2zLAPzMyW'}, {'author': 'IT頭條', 'title': 'Python 教程-Python 安裝', 'url': 'https://www.lmonkey.com/t/2zLAPzMyW'}, {'author': 'IT頭條', 'title': 'Python 教程-了解Python', 'url': 'https://www.lmonkey.com/t/2zLAPzMyW'}, {'author': 'GaiJoon', 'title': '喊話 JavaScript 開發者:玩 DOM 也要專業范兒', 'url': 'https://www.lmonkey.com/t/2zLAPzMyW'}, {'author': 'IT頭條', 'title': '1000 行 Python 代碼腳本 bug,或影響上百篇學術論文', 'url': 'https://www.lmonkey.com/t/2zLAPzMyW'}, {'author': 'IT頭條', 'title': '生產環境下的LAMP環境搭建', 'url': 'https://www.lmonkey.com/t/user/168547'}, {'author': '王炸', 'title': 'Golang語言的主要特性與發展的環境和影響因素', 'url': 'https://www.lmonkey.com/t/G5yvRWXyp'}, {'author': '王炸', 'title': '分享 10 個有用的 Laravel 5.8 集合輔助方法', 'url': 'https://www.lmonkey.com/t/G5yvRWXyp'}]self.data = datareturn True#寫入數據def writedata(self):#寫入數據with open('self.filepath','w')as fp:json.dump(self.data,fp)#實例化對象 Yq()(二)爬蟲實戰BeautifulSoup數據解析
1)、bs4的安裝與三種使用方式
BeautifulSoup是一個可以從HTML或XML文件中提取數據的python庫,它能夠通過你喜歡的轉換器實現慣用的文檔,導航、查找、修改文檔的方式,BeautifulSoup可節省大量的時間。
官方文檔:https://www.crummy.com/software/BeautifulSoup/bs4/doc
a、安裝
命令:pip install BeautifulSoup4
插曲一:解決bug—You should consider upgrading via the ‘python -m pip install --upgrade pip’ command.
刪除下列文件夾D:\softwaredownload\anaconda\Lib\site-packages\pip-20.0.2.dist-info
再次運行python -m pip install --upgrade pip 后升級成功,之前不能安裝的包也能安裝了!
問題解決
b、三種使用方式
(1)使用Tag對象按照文檔結構獲取數據
(3)、使用CSS選擇器
2)bs4-學習猿地-猿圈
''' 分析爬取的數據 數據源地址:https://www.lmonkey.com/t 數據內容:文章標題、文章的鏈接、作者、發布時間 工具:python,requests,bs4 ''' import requests,json from bs4 import BeautifulSoup#1.定義請求的URL和請求頭 url = 'https://www.lmonkey.com/t' #定義請求頭信息 headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36' } #2.發送請求 res = requests.get(url,headers=headers)#3.判斷請求是否成功,并獲取請求的源代碼 if res.status_code == 200:pass#4.解析數據soup = BeautifulSoup(res.text,'lxml')#獲取頁面中所有的文章divs = soup.find_all('div',class_="list-group-item list-group-item-action p-06")varlist= []for i in divs:r = i.find('div',class_="topic_title mb-0 lh-180")if r:# print(i.a['href'])# print(i.strong.a.text)# print(i.span['title'])vardict = {'title':r.text.split('\n')[0],'url':i.a['href'],'author':i.strong.a.text,'time':i.span['title']}#將文本切分,只要第一個內容varlist.append(vardict)print(varlist)#運行結果'''[{'title': '圖層操作'}, {'title': 'ps_行業介紹筆記'}, {'title': 'DIV+CSS頁面布局筆記'}, {'title': '認識網站筆記'}, {'title': 'ps_行業介紹筆記'}, {'title': 'DIV+CSS頁面布局筆記'}, {'title': '認識網站筆記'}, {'title': 'requests筆記'}, {'title': 'Java的各種數據類型對象庫的處理應用筆記'}, {'title': 'Java語言的基本語法格式筆記'}, {'title': 'Java程序開發入門筆記'}, {'title': 'Java程序開發入門筆記'}, {'title': 'Java編譯過程'}, {'title': '常用快捷鍵'}, {'title': 'Java程序開發入門筆記'}]'''#5.寫入數據with open ('./yq.json','w') as fp:json.dump(varlist,fp) #運行結果 [{'title': '圖層操作', 'url': 'https://www.lmonkey.com/t/oREQ9lXE1', 'author': '?_xQfer4', 'time': '2020-06-17 17:50:37'}, {'title': 'ps_行業介紹筆記', 'url': 'https://www.lmonkey.com/t/1NLXY8jBV', 'author': '?_xQfer4', 'time': '2020-06-17 17:33:43'}, {'title': 'DIV+CSS頁面布局筆記', 'url': 'https://www.lmonkey.com/t/GRLbK8zBz', 'author': '~~~七~~~', 'time': '2020-06-13 17:54:32'}, {'title': '認識網站筆記', 'url': 'https://www.lmonkey.com/t/oZBde7OEp', 'author': 'coding_dog', 'time': '2020-06-09 19:43:36'}, {'title': 'ps_行業介紹筆記', 'url': 'https://www.lmonkey.com/t/qpBarN3EJ', 'author': '?_xQfer4', 'time': '2020-06-07 22:15:14'}, {'title': 'DIV+CSS頁面布局筆記', 'url': 'https://www.lmonkey.com/t/dvy91vbyK', 'author': '櫻桃大嘴猴.', 'time': '2020-06-04 11:30:36'}, {'title': '認識網站筆記', 'url': 'https://www.lmonkey.com/t/kNB0opeLe', 'author': '徐梟雄老師-英子', 'time': '2020-05-31 21:30:56'}, {'title': 'requests筆記', 'url': 'https://www.lmonkey.com/t/WMLDKw5yY', 'author': '溫水泡青蛙', 'time': '2020-05-31 16:00:54'}, {'title': 'Java的各種數據類型對象庫的處理應用筆記', 'url': 'https://www.lmonkey.com/t/QOLMxNmyd', 'author': '明明就晴天', 'time': '2020-05-29 13:23:38'}, {'title': 'Java語言的基本語法格式筆記', 'url': 'https://www.lmonkey.com/t/wDEx3zZBK', 'author': '明明就晴天', 'time': '2020-05-28 23:20:57'}, {'title': 'Java程序開發入門筆記', 'url': 'https://www.lmonkey.com/t/XkyJ48eBe', 'author': '明明就晴天', 'time': '2020-05-28 22:16:28'}, {'title': 'Java程序開發入門筆記', 'url': 'https://www.lmonkey.com/t/OxLP07qLe', 'author': '明明就晴天', 'time': '2020-05-28 22:12:38'}, {'title': 'Java編譯過程', 'url': 'https://www.lmonkey.com/t/2QL7pvmBk', 'author': '??牛', 'time': '2020-05-18 13:07:53'}, {'title': '常用快捷鍵', 'url': 'https://www.lmonkey.com/t/7VEZYdoB3', 'author': '??牛', 'time': '2020-05-18 13:01:41'}, {'title': 'Java程序開發入門筆記', 'url': 'https://www.lmonkey.com/t/VDLeZlNBX', 'author': '??牛', 'time': '2020-05-18 12:57:07'}]3)bs4-實戰猿圈-代碼優化
''' 分析爬取的數據 數據源地址:https://www.lmonkey.com/t 數據內容:文章標題、文章的鏈接、作者、發布時間 工具:python,requests,bs4 ''' import requests,json from bs4 import BeautifulSoup#封裝類 class Bs4Yq():#定義屬性#請求得urlurl = 'https://www.lmonkey.com/t'#請求頭headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36'}#響應源代碼的存放位置res = None#存儲解析后的json數據varlist = []#初始化方法def __init__(self):#發起一個請求res = requests.get(self.url,headers=self.headers)if res.status_code == 200:self.res_html = res.textif self.ParseData():self.WriteJson()print('請求成功,數據寫入文件')else:print("請求失敗")#解析html數據def ParseData(self):soup = BeautifulSoup(self.res_html, 'lxml')try:# 獲取頁面中所有的文章divs = soup.find_all('div', class_="list-group-item list-group-item-action p-06")for i in divs:r = i.find('div', class_="topic_title mb-0 lh-180")if r:# print(i.a['href'])# print(i.strong.a.text)# print(i.span['title'])vardict = {'title': r.text.split('\n')[0],'url': i.a['href'],'author': i.strong.a.text,'time': i.span['title']} # 將文本切分,只要第一個內容self.varlist.append(vardict)# print(varlist)return Trueexcept:return False#寫入json文件def WriteJson(self):if self.varlist != []:try:with open('./yq.json','w') as fp:json.dump(self.varlist,fp)return Trueexcept:return Falseelse:print('無法獲取當前解析的數據')Bs4Yq()(三)爬蟲實戰之re正則表達式數據解析
1)re正則模塊的介紹
2)re模塊的相關函數–match與search
如果string的開始位置能夠找到這個正則樣式的任意個匹配,就返回一個相應的匹配對象。如果不匹配,
就返回None ;注意它與零長度匹配是不同的。
3)re模塊相關函數
#re模塊相關函數--其他函數 ''' re.findall()+按照正則表達式的規則在字符串中匹配元素,結果返回一個列表,如果沒有找到則返回空列表re.finditer()+按照正則表達式的規則在字符中匹配所有符合的元素,返回一個迭代器 re.sub()搜索替換+按照正則表達式規則,在字符串中找到需要被替換的字符串,完成一個替換參數:pattern:正則表達式規則,匹配需要被替換的字符串repl:替換后的字符串string:被替換的原始字符串 compile()可以直接將正則表達式定義為正則對象,使用正則對象直接操作 ''' import re #定義字符串 varstr = 'iloveyou521tosimida511' #正則表達式 reg ='\d{3}' #函數調用 # res = re.findall(reg,varstr) res = re.finditer(reg,varstr) # print(list(res)) # print(res) # '''運行結果[<_sre.SRE_Match object; span=(8, 11), match='521'>, <_sre.SRE_Match object; span=(19, 22), match='511'>] # <callable_iterator object at 0x0000000002989CC0>'''''' reg ='\d{3}' 運行結果['5', '2', '1', '5', '1', '1'] reg ='\d{4}' 運行結果['521', '511'] reg ='\d{3}' res = re.finditer(reg,varstr) 運行結果<callable_iterator object at 0x00000000029D9CC0> '''#找到數字,替換成其它 # res = re.sub(reg,'AAA',varstr) # print(res)#直接定義正則表達式對象 reg = re.compile('\d{3}') #直接使用創建的正則對象,去調用對應的方法或者函數 res = reg.findall(string=varstr) # print(res)lines = ['i love 512 you','i love 521 you','i love 345 you','i love 543 you', ] reg = re.compile('\d{3}') for i in lines:# reg = '\d{3}'# res = re.search(reg,i)# print(res.group())res = reg.search(i).group()print(res) ''' 運行結果: 512 521 345 543 '''4)re模塊–正則表達式的定義和規則
#re模塊--正則表達式的定義和規則 import re #普通字符 # vars = 'iloveyou' # reg = 'love' # res = re.search(reg,vars).group() # print(res) #運行結果:love#轉義字符\w \W \d \D \s \S.......... varstr = '2$_ilove5 21you' reg = '\w'#代表 單個 字母、數字、下劃線 reg = '\W'#代表 單個的 非字母、數字、下劃線 reg = '\d'#代表 單個的 數字 reg = '\D'#代表 單個的 非數字 reg = '\s'#代表 單個的 空格符或制表符 reg = '\S'#代表 單個的 非 空格符或制表符 reg = '\w\w\w\w\d'#組合使用#特殊字符 . * + ? {} () ^ $ varstr = 'hello WORLD 5211 iloveyou'reg = '.' # . 點 代表 單個的 任意字符 除了換行符之外 reg = '.*' # * 星 代表匹配次數 任意次數 '''*的特點:如果使用*號,那么在匹配開始處如果符合要求,則按照規則一直向后匹配,直道不符合匹配規則結束并把前面符合的數據返回如果使用*號,那么在匹配開始處如果不符合要求,則直接返回,匹配到的次數為0''' reg = '\w+' # + 代表匹配字數 至少要求匹配一次 reg = '\w+?'# ? 拒絕貪婪,就是前面的匹配規則只要達成則返回 reg = '\w+?' reg = '\w{4}'#{}代表匹配數字,{4}一個數字時,表示必須匹配的次數 reg = '\w{2,5}'#{}代表匹配數字,{2,5}兩個數字時,表示必須匹配的區間次數 reg = '[A-Z,a-z,0-9,]'#[]代表字符的范圍[A-Z,a-z,0-9,] = \w reg = '\w+(\d{4})' #()代表子組,括號中的表達式首先作為整個正則的一部分,另外會把符合小括號中的內容單獨提取一份varstr = '17610105211' #定義一個匹配手機號的正則表達式 reg = '^1\d{11}$' # ^ 代表開頭 $ 代表結尾res = re.search(reg,varstr).group() print(res,len(res)) #運行結果:i#正則模式 re.I不區分大小寫 vars = 'iLOVEyou' reg = reg.search(reg,vars,re.I) print(re)#練習題 #定義一個正則表達式,來驗證郵箱是否正確#+規定qq號碼必須是5~12位的數字,后面必須跟".com" #完善手機號的正則表達式 #定義一個匹配 IP 的正則表達式 192.168.1.1 255.255.255.05)正則實戰–猿來如此
'''數據源地址:https://www.lmonkey.com/ask數據字段:問題 時間 作者 url鏈接 ''' import requests,re,json #定義請求的url和請求頭信息 url = 'https://www.lmonkey.com/ask' headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36' } #2.發起請求 res = requests.get(url,headers=headers) #3.檢測請求是否成功 if res.status_code == 200:#4.獲取返回的數據res_html = res.text# with open('./res.html','w',encoding='utf-8') as fp:# fp.write(res_html)#5.進行數據解析#定義解析問題標題的正則reg = '<div class="topic_title mb-0 lh-180 ml-n2">(.*?)<small'#調用正則方法去獲取問題的標題titlelist = re.findall(reg,res_html)#定義解析作者的正則reg = '<strong>(.*?)</strong>'authorlist = re.findall(reg,res_html)# 定義解析問題的時間reg = '<span data-toggle="tooltip" data-placement="top" title="(.*?)">'datatime = re.findall(reg,res_html)#獲取文章的連接地址reg = '<a href="(https://www.lmonkey.com/ask/\d+)" target="_blank">'urllist = re.findall(reg,res_html)#壓縮數據#常規方法處理數據[{},{},{}]data = list(zip(titlelist,authorlist,datatime,urllist))# datalist = []# for i in data:# res = {'title':i[0],'url':i[1],'author':i[2],'datatime':i[3]}# datalist.append(res)# print(datalist)datalist = [{'title':i[0],'url':i[1],'author':i[2],'datatime':i[3]} for i in data]print(datalist)#數據入庫with open('./data.json','w',encoding='utf-8') as fp:json.dump(datalist,fp)輸出的結果,用json在線解析及格式化驗證工具對其格式進行處理,顯示如下:
[
{
“title”:"【Java】You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘USER_ID=‘2’’ at line 1",
“url”:“輕風_N4zWcI”,
“author”:“2020-06-23 16:26:33”,
“datatime”:“https://www.lmonkey.com/ask/22985”
},
{
“title”:"【前端】為什么404代表找不到網址,404這個數字背后的邏輯是什么?",
“url”:“感覺_sp7aqM”,
“author”:“2020-06-20 21:29:36”,
“datatime”:“https://www.lmonkey.com/ask/22984”
},
{
“title”:"【PHP】使用User::create($input);進行添加數據,只有password字段添加成功了,而username是null。傳輸的有數據,不知道為什么,謝謝老師的解答。",
“url”:“雨季”,
“author”:“2020-05-25 15:12:05”,
“datatime”:“https://www.lmonkey.com/ask/22983”
},
{
“title”:"【前端】學習猿地的課程列表頁,怎么我在官網找不到?有老師用到的圖片素材嗎?",
“url”:"? 月",
“author”:“2020-05-20 22:30:35”,
“datatime”:“https://www.lmonkey.com/ask/22982”
},
{
“title”:"【Java】打開的軟件,是?",
“url”:“young先森”,
“author”:“2020-05-19 21:01:36”,
“datatime”:“https://www.lmonkey.com/ask/22981”
},
{
“title”:"【PHP】!DOCTYPE 標準是大寫還是小寫",
“url”:“ニック”,
“author”:“2020-05-18 23:04:01”,
“datatime”:“https://www.lmonkey.com/ask/22980”
},
{
“title”:"【PHP】什么時候會出thinkphp的內容?我看你們的課程介紹里面有才買的課程的",
“url”:“愛唯主機”,
“author”:“2020-05-10 10:44:40”,
“datatime”:“https://www.lmonkey.com/ask/22979”
},
{
“title”:"【Python】源碼哪里有",
“url”:“孫小兜”,
“author”:“2020-05-08 16:36:02”,
“datatime”:“https://www.lmonkey.com/ask/22978”
},
{
“title”:"【前端】不需要封裝函數去校驗獲取下一個兄弟節點的類型",
“url”:“Beyant”,
“author”:“2020-04-27 21:30:36”,
“datatime”:“https://www.lmonkey.com/ask/22977”
},
{
“title”:"【Java】課程一般吧",
“url”:“陽陽_sRAvEK”,
“author”:“2020-04-25 16:50:53”,
“datatime”:“https://www.lmonkey.com/ask/22976”
},
{
“title”:"【Java】課程一般吧",
“url”:“陽陽_sRAvEK”,
“author”:“2020-04-25 16:49:20”,
“datatime”:“https://www.lmonkey.com/ask/22975”
},
{
“title”:"【Java】Servlet.service() for servlet [com.shop.servlet.user.DoUserAdd] in context with path [/ShoppingProject] threw exception",
“url”:“pado”,
“author”:“2020-04-22 20:15:33”,
“datatime”:“https://www.lmonkey.com/ask/22974”
},
{
“title”:"【Java】根據老師步驟進行,最后跳轉顯示org.apache.catalina.connector.RequestFacade cannot be cast to javax.servlet.ServletResponse,這是什么原因呢?",
“url”:“顧你安穩”,
“author”:“2020-04-21 22:31:25”,
“datatime”:“https://www.lmonkey.com/ask/22973”
},
{
“title”:"【Java】老師的表單驗證好像寫錯了吧,有bug。如果其他數據都對,但是驗證碼那一項寫錯,表單照樣可以提交,并沒有阻止。是不是Ajax的異步造成的bug。",
“url”:“喜歡悠哉獨自在”,
“author”:“2020-04-20 18:41:47”,
“datatime”:“https://www.lmonkey.com/ask/22972”
},
{
“title”:"【Python】help,爬蟲豆瓣電影TOP250爬取電影名稱,導演,年份,鏈接–《初戀這件小事》的導演爬不下來,help",
“url”:“惠之吉”,
“author”:“2020-04-19 09:52:42”,
“datatime”:“https://www.lmonkey.com/ask/22971”
}
]
總結
- 上一篇: GUET网络渗透测试实验报告1
- 下一篇: 软件测试——接口常见问题汇总