Python
未读
Python-pro
csv import csv
# encoding='utf-8':设置文件内容编码
# newline='':写入避免双倍行距
def write_data():
with open('stu.csv', 'a+', encoding='utf-8', newline='') as fil
Python
未读
Python-basic
遍历对象的属性 函数vars for f,v in vars(resp).items():
print(f"{f}:{v}") dict属性 for attr, val in resp.__dict__.items():
print(f"{attr}:{val}") dir函数
Python
未读
Python-reptile
XPath import requests
from lxml import etree
def send_request():
url = 'https://www.shuqi.com/'
headers = {'user-agent':