- 博客(12)
- 收藏
- 关注
原创 赶集租房
from bs4 import BeautifulSoup import requests url =’http://bj.ganji.com/fang1/’ html= requests.get(url) soup=BeautifulSoup(html.text,’lxml’) name=soup.select(‘.dd-item.title’) size=soup.select(‘.
2017-05-08 17:13:06
234
原创 爬取今日头条街拍
属课程中代码敲下。 课程地址:http://study.163.com/course/courseLearn.htm?courseId=1003735019#/learn/video?lessonId=1004298385&courseId=1003735019 代码如下: import requests import re from bs4 import BeautifulSoup f
2017-04-26 09:57:42
523
原创 爬铁瓜简介
from bs4 import BeautifulSoup import requests url ='https://nba.hupu.com/players/carmeloanthony-252.html' html =requests.get(url) html.encoding ='utf-8' soup =BeautifulSoup(html.text,'lxml') name =sou
2017-04-19 14:54:30
624
原创 简单的爬取新浪新闻标题与链接
from bs4 import BeautifulSoup import requests url ='http://news.sina.com.cn/china/' html =requests.get(url) html.encoding ='utf-8' soup =BeautifulSoup(html.text,'lxml') links=soup.select('.blk122') x
2017-04-18 14:42:37
1146
原创 菜鸟-爬取百度贴吧美图并保存
from bs4 import BeautifulSoup import random import os import re import requests url ='https://tieba.baidu.com/p/4814458788?pn=' headers ={'User-Agent':"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/
2017-04-12 16:12:44
598
转载 菜鸟爬虫-爬妹子图
转自:http://cuiqingcai.com/3179.html 大神 from bs4 import BeautifulSoup import requests import os headers ={'User-Agent':"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrom
2017-04-10 11:30:22
1202
原创 小白练习-使用BeautifulSoup库简单的爬虫练习
from bs4 import BeautifulSoup import requests url = 'http://www.tripadvisor.cn/Attractions-g60763-Activities-New_York_City_New_York.html#ATTRACTION_SORT_WRAPPER' we_data=requests.get(url)# 用requests.g
2017-03-30 09:56:57
1203
原创 小菜鸟练手-lxml安装时候报错问题
在pycharm中,直接安装lxml会报错,在Python官网https://pypi.python.org/pypi/lxml/3.7.3 下载适合自己系统的.exe文件直接运行安装即可。
2017-03-29 16:39:56
316
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人