随笔分类 - 爬虫
摘要:request中文API https://requests.readthedocs.io/zh_CN/latest/
阅读全文
摘要:登陆的方式 1.实例化session,使用session发送post请求,在使用它获取登陆后的页面 # coding=utf-8 import requests session = requests.session() post_url = "http://www.renren.com/PLogin
阅读全文
摘要:找一个免费IP的网站 # coding=utf-8 import requests proxies = {"http":"http://114.234.80.188:80"}#就代理填到这里 headers = { "User-Agent": "Mozilla/5.0 (Macintosh; Int
阅读全文
摘要:要爬取的网站:http://fy.iciba.com/ https://blog.csdn.net/weixin_43808690/article/details/87886075 原文链接 代码: from urllib import request,parse import json class
阅读全文
摘要:如果不改变header,往往只能获取到很少一部分的content。所以我们要改变header import requests respones = requests.get("https://www.baidu.com") print(respones.status_code) print(resp
阅读全文
摘要: ●默认端口号: 443HTTPS比HTTP更安全,但是性能更低
阅读全文
摘要:字符串的类型 ●bytes: 二进制 互联网.上数据的都是以二进制的方式传输的 ●str : unicode的呈现形式 字符(Cheracter)是各种文字和符号的总称,包括各国家文字、标点符号、图形符号、数字等 字符集(Character set)是多个字符的集合 字符集包括: ASCII字符集、
阅读全文

浙公网安备 33010602011771号