上一页 1 ··· 4 5 6 7 8 9 10 下一页
摘要: import requests from lxml import etree url = 'https://changsha.zbj.com/xcxkfzbjzbj/f.html?fr=zbj.sy.zyyw_2nd.lv3&r=2' headers = { 'User-Agent': 'Mozil 阅读全文
posted @ 2023-03-02 23:28 0x1e61 阅读(36) 评论(0) 推荐(0)
摘要: # 准备一个html格式文档 doc = ''' <div> <ul> <li class="item-0"><a href="https://ask.hellobi.com/link1.html">first item</a></li> <li class="item-1"><a href="ht 阅读全文
posted @ 2023-03-02 21:45 0x1e61 阅读(28) 评论(0) 推荐(0)
摘要: VLAN数据帧格式 要使交换机能够分辨不同VLAN的报文,需要在报文中添加标识VLAN信息的字段。IEEE 802.1Q协议规定,在以太网数据帧的目的MAC地址和源MAC地址字段之后、协议类型字段之前加入4个字节的VLAN标签(又称VLAN Tag,简称Tag),用于标识数据帧所属的VLAN。 在一 阅读全文
posted @ 2023-03-02 10:39 0x1e61 阅读(1029) 评论(0) 推荐(0)
摘要: import requests from bs4 import BeautifulSoup url = 'http://www.umeituku.com/bizhitupian/meinvbizhi/' headers = { 'User-Agent': 'Mozilla/5.0 (Windows 阅读全文
posted @ 2023-03-01 22:49 0x1e61 阅读(50) 评论(0) 推荐(0)
摘要: import requests from bs4 import BeautifulSoup import csv url = 'https://price.21food.cn/market/174-p1.html' headers = { 'User-Agent': 'Mozilla/5.0 (Wi 阅读全文
posted @ 2023-02-28 20:17 0x1e61 阅读(17) 评论(0) 推荐(0)
摘要: # 下面的一段HTML代码将作为例子被多次用到.这是 爱丽丝梦游仙境的 的一段内容(以后内容中简称为 爱丽丝 的文档): html_doc = """ <html><head><title>The Dormouse's story</title></head> <body> <p class="ti 阅读全文
posted @ 2023-02-28 20:16 0x1e61 阅读(19) 评论(0) 推荐(0)
摘要: import requests import re url = 'xxx/index2.htm' headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like 阅读全文
posted @ 2023-02-28 13:06 0x1e61 阅读(486) 评论(0) 推荐(0)
摘要: import csv import re import requests headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrom 阅读全文
posted @ 2023-02-28 08:53 0x1e61 阅读(218) 评论(0) 推荐(0)
摘要: 1. requests 中的请求方法 HTTP 请求方法: requests.get(url, params=None, **kwargs) # GET 请求 requests.post(url, data=None, json=None, **kwargs) # POST 请求 requests. 阅读全文
posted @ 2023-02-27 19:50 0x1e61 阅读(130) 评论(0) 推荐(0)
摘要: import re # 1.从一个字符串中提取到所以的数字 lst = re.findall('\d+', "fajhdsjk123kjfakl123213") print(lst) # 返回的是一个列表 # 2.判断一句话是否有数字 # search的特点:匹配字符串,匹配到第一个结果就返回,不会 阅读全文
posted @ 2023-02-26 23:12 0x1e61 阅读(38) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 下一页