Code Monkey home page Code Monkey logo

Comments (6)

XWang20 avatar XWang20 commented on August 15, 2024

修改了代码,现在再试试呢。关键词搜索需要将mblog.py中第28行代码替换为urls = init_url_by_search(),并在init_url_by_search()中增加关键词列表。

from weibocrawler.

IsolatoWen avatar IsolatoWen commented on August 15, 2024

from weibocrawler.

XWang20 avatar XWang20 commented on August 15, 2024

暂时没办法获取某个用户的关键词微博。不过我看了一下抑郁症的微博不多,可以先在网页端搜索关键词后获取html,通过正则表达式把博文的url(例如https://weibo.com/2803301701/AaMlnrnhd的形式)提取出来,通过转换成微博mid(方法:http://jermic.cc/2019/02/13/weibo-url-mid-convert/),获得一个微博mid列表,通过mid列表再去爬转发和评论。
我测试了一下添加cookie爬取是没有问题的,注意要用m.weibo.cn站点的cookie。不过如果按这样获取应该也不需要cookie了。

from weibocrawler.

IsolatoWen avatar IsolatoWen commented on August 15, 2024

from weibocrawler.

XWang20 avatar XWang20 commented on August 15, 2024

有问题随时联系!

from weibocrawler.

IsolatoWen avatar IsolatoWen commented on August 15, 2024

from weibocrawler.

Related Issues (16)

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.