上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页
  2020年3月13日
摘要: pyquery遍历与获取数据: #coding:utf-8 import pyquery doc=pyquery.PyQuery(filename="index.html") print(doc(".item-0.active")) #一个节点; #.表示class名称; #.active .替换了 阅读全文
posted @ 2020-03-13 03:08 共感的艺术 阅读(689) 评论(0) 推荐(0)
摘要: pyquery的简单用途: import pyquery html=""" <html> <title>这是标题</title> <body> <p id="hi">Hello</p> <ul> <li>list1</li> <li>list2</li> </ul> </body> </html> 阅读全文
posted @ 2020-03-13 03:06 共感的艺术 阅读(277) 评论(0) 推荐(0)
摘要: requests的cookie操作,cookie自动化 一、requests的cookie操作: import requests user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)' #模拟一个计算机 headers={'User 阅读全文
posted @ 2020-03-13 03:03 共感的艺术 阅读(712) 评论(0) 推荐(0)
摘要: requests文件_json: #coding:utf-8 import requests import json #url="http://httpbin.org/post" #data textfile newurl="http://pythonscraping.com/pages/proce 阅读全文
posted @ 2020-03-13 03:00 共感的艺术 阅读(154) 评论(0) 推荐(0)
摘要: selenium登录csdn,urllib抓取数据: import selenium import requests import selenium.webdriver import selenium.webdriver.common.keys import time #需要手动滑动验证码 driv 阅读全文
posted @ 2020-03-13 02:53 共感的艺术 阅读(283) 评论(0) 推荐(0)
摘要: selenium登录12306,requests抓取数据: import selenium import selenium.webdriver import selenium.webdriver.common.keys from selenium.webdriver.common.action_ch 阅读全文
posted @ 2020-03-13 02:52 共感的艺术 阅读(330) 评论(0) 推荐(0)
摘要: selenium登录淘宝,requests抓取购物车: import selenium import selenium.webdriver import selenium.webdriver.common.keys import requests import lxml import lxml.et 阅读全文
posted @ 2020-03-13 02:50 共感的艺术 阅读(736) 评论(0) 推荐(0)
摘要: selenium登录京东,requests抓取购物车: import selenium import selenium.webdriver import selenium.webdriver.common.keys import requests import lxml import lxml.et 阅读全文
posted @ 2020-03-13 02:49 共感的艺术 阅读(612) 评论(0) 推荐(0)
摘要: requests抓取json判断IP所在地: import requests import requests.auth #auth 代表登录 req=requests.get("https://api.ip2country.info/ip?113.88.65.106",verify=False) # 阅读全文
posted @ 2020-03-13 02:48 共感的艺术 阅读(231) 评论(0) 推荐(0)
摘要: requests登录路由器: import requests import requests.auth #auth 代表登录 #路由器在登录的时候会在网页 弹出一个框 让输入用户名和密码 #登录路由器 auth=requests.auth.HTTPBasicAuth("ryan","password 阅读全文
posted @ 2020-03-13 02:47 共感的艺术 阅读(360) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页