Coder Social home page Coder Social logo

Comments (5)

Oranni avatar Oranni commented on July 24, 2024

老师好我这边的问题是:
http://mp.weixin.qq.com/profile?src=3&timestamp=1464169161&ver=1&signature=ZdyhV0hBgvQjTwQwq5-6NK5hujUCFRYP3lZ2MRKVslHN8DuffzOIfhWgD5sMEqcPDGSnJoGOCkBvlbOwIWwvCQ==
这个网页里面的很多class我都找不到。我用find_all列出所有class发现里面的很多class也就是一个一个的文章的上一级title都扒不出来。然后就没有办法抓取每个文章class里面的URL。
希望老师解答一下~~3Q

对哒,老师尽快解答哈~~要交作业。。3Q老师!!!~XDDD

from cjc.

chengjun avatar chengjun commented on July 24, 2024

@Oranni 举一个栗子🌰,记得给出代码

from cjc.

Oranni avatar Oranni commented on July 24, 2024

import urllib2 from bs4 import BeautifulSoup
url = 'http://mp.weixin.qq.com/profile?src=3&timestamp=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.

chengjun avatar chengjun commented on July 24, 2024

testWechat.ipynb.zip

@Oranni 我打印出来有东西,见附件。

from cjc.

Oranni avatar Oranni commented on July 24, 2024

收到,我没有逐一打印,我再看看怎么扒文章的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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.