
Python网络爬虫
0基础网络爬虫
笔记
Bio Coder
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python 利用BeautifulSoup和正则表达式 来爬取旅游网数据
import re import requests import time from bs4 import BeautifulSoup url = ‘http://www.cntour.cn/’ r = requests.get(url) print(r.encoding,len(r.text)) soup = BeautifulSoup(r.text, ‘lxml’) data = soup.s...原创 2018-11-09 21:49:23 · 528 阅读 · 0 评论 -
Python批量爬取堆糖网图片
import urllib.parse import requests #第三方请求库 import json import jsonpath #处理json文件的的提取库 from bs4 import BeautifulSoup import os import urllib import re label = 'AI' label = urllib.parse.quo...翻译 2018-11-11 11:30:27 · 711 阅读 · 2 评论 -
利用Python批量爬取XKCD动漫图片,并批量保存
import requests, os, bs4 url = ‘https://xkcd.com’ os.makedirs(‘xkcd’,exist_ok = True) while not url.endswith(’#’): # download the page print('downloading the %s...'%(url)) # '%s...'%(url)对字符串及进行替换 re...翻译 2018-11-10 16:37:36 · 507 阅读 · 0 评论