Comments (5)
老师好我这边的问题是:
http://mp.weixin.qq.com/profile?src=3×tamp=1464169161&ver=1&signature=ZdyhV0hBgvQjTwQwq5-6NK5hujUCFRYP3lZ2MRKVslHN8DuffzOIfhWgD5sMEqcPDGSnJoGOCkBvlbOwIWwvCQ==
这个网页里面的很多class我都找不到。我用find_all列出所有class发现里面的很多class也就是一个一个的文章的上一级title都扒不出来。然后就没有办法抓取每个文章class里面的URL。
希望老师解答一下~~3Q
对哒,老师尽快解答哈~~要交作业。。3Q老师!!!~XDDD
from cjc.
@Oranni 举一个栗子🌰,记得给出代码
from cjc.
import urllib2 from bs4 import BeautifulSoup
url = 'http://mp.weixin.qq.com/profile?src=3×tamp=1464169161&ver=1&signature=ZdyhV0hBgvQjTwQwq5-6NK5hujUCFRYP3lZ2MRKVslHN8DuffzOIfhWgD5sMEqcPDGSnJoGOCkBvlbOwIWwvCQ==' content = urllib2.urlopen(url).read() soup = BeautifulSoup(content, 'html.parser')
print soup.div
brief_info=soup.find_all('div',{'class','profile_desc_value'})
——显示[]空的列表
from cjc.
@Oranni 我打印出来有东西,见附件。
from cjc.
收到,我没有逐一打印,我再看看怎么扒文章的list ,非常谢谢老师~
祝好,
刘妮
在 2016年5月25日,下午9:59,Wang Cheng-Jun [email protected] 写道:
testWechat.ipynb.zip https://github.com/computational-class/cjc2016/files/282112/testWechat.ipynb.zip
@Oranni https://github.com/Oranni 我打印出来有东西,见附件。—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub #35 (comment)
from cjc.
Related Issues (20)
- 申一杨18210130076第一次作业 HOT 6
- Song-Zheyuan HOT 7
- hanshaojun HOT 1
- Luo Taotao HOT 7
- 王雪-18210130089-个人作业 HOT 10
- Guanying LI HOT 5
- XIA YUN HOT 5
- 范雅晨 18210130052 HOT 7
- 夏维兰 HOT 7
- 江婧轩 HOT 6
- Dong Yinghui HOT 8
- 杨颜菲 HOT 6
- 游雁麟
- 小组大作业-郑诗晨&孙佳煜
- 期末小组大作业-范雅晨 申一杨 游雁麟
- 期末小组大作业-王伟哲 王雪 夏蕴 HOT 1
- 期末小组大作业 - 宋哲源 夏维兰 周圆
- 期末作业-杨颜菲 吴荃雁 骆陶陶
- 期末小组大作业_过馨妍 江婧轩 董颖慧
- 夏维兰
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cjc.