![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
菜鸟练习
君18
Python
展开
-
小白练习-使用BeautifulSoup库简单的爬虫练习
from bs4 import BeautifulSoupimport requestsurl = '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 · 1205 阅读 · 0 评论 -
爬取今日头条街拍
属课程中代码敲下。 课程地址: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 · 531 阅读 · 0 评论 -
爬取豆瓣电影推荐排行榜
爬取豆瓣电影原创 2017-04-21 18:20:56 · 950 阅读 · 0 评论 -
简单的爬取豆瓣电影
练习原创 2017-04-20 14:43:34 · 533 阅读 · 0 评论 -
简单爬取豆瓣纸书名与简介,图片链接1
练习原创 2017-04-20 11:45:46 · 382 阅读 · 0 评论 -
简单的爬取豆瓣纸书名与简介和图片
练习原创 2017-04-19 15:45:45 · 364 阅读 · 0 评论 -
爬铁瓜简介
from bs4 import BeautifulSoupimport requestsurl ='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 · 631 阅读 · 0 评论 -
简单的爬取新浪新闻标题与链接
from bs4 import BeautifulSoupimport requestsurl ='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 · 1155 阅读 · 0 评论 -
菜鸟-爬取百度贴吧美图并保存
from bs4 import BeautifulSoupimport randomimport osimport reimport requestsurl ='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 · 603 阅读 · 0 评论 -
菜鸟爬虫-爬妹子图
转自:http://cuiqingcai.com/3179.html 大神from bs4 import BeautifulSoupimport requestsimport osheaders ={'User-Agent':"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrom转载 2017-04-10 11:30:22 · 1206 阅读 · 0 评论 -
赶集租房
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 · 235 阅读 · 0 评论