标签:request googl bsp enc port ext range status imp
import requests for i in range(1,21): r = requests.get("https://www.google.cn/") r.raise_for_status() r.encoding=‘utf-8‘ print(r.status_code) print(r.text) len1=len(r.text) len2=len(r.content) print(‘text()属性所返回的长度{}‘.format(len1)) print(‘content()属性所返回的长度{}‘.format(len2))
标签:request googl bsp enc port ext range status imp
原文地址:https://www.cnblogs.com/youngTW/p/12882823.html