Giter VIP home page Giter VIP logo

weibo2markdown's Introduction

是什么?

是一个用.NET Core开发的控制台应用程序,可以导出微博内容生成Markdown的工具

为什么?

​ 可能很多人都想过要注销微博,也许是因为微博网络环境太喧嚣,想慢下来静静;也许是不愿再置身于信息洪流中盲目为他人的观点站队,希望能独自的思考; 也许是生活、感情有某种变故,不得不尘封往事开启新的人生篇章........过往的经历,无论美好或痛苦,和未来一样,都是此刻无法改变的。这些都是废话,简而言之,就是一些人由于某种原因,希望注销掉微博,但是又舍不得微博上的内容。我自己曾经也有这种需求,所以就做了这个。它可以用最简洁快速的方法,导出你的微博内容,生成Markdown文件,你可以导入到语雀文档、有道云笔记等各种协同文档平台,也可以方便的转换为html文件,放在你的个人博客站点或是GitPages下,随时浏览。

怎么用?

方法一:克隆代码到本地,安装.NET Core 5 Runtime,`dotnet run`即可,输入你想导出的微博用户Id即可。(如何获取微博用户id请自行百度,非常简单)

方法二:下载Release的可执行文件,支持Mac、Win、Linux。Windows下双击运行即可,Linux下请先` chmod +x`赋予读写权限

它有什么特点(优点、缺点)

优点: 轻量级、高效、安全、无需登录

缺点: 只能导出公开的微博内容

FBI Warning,注意事项!!!

​ 请勿用来从事商业活动或是违法事宜....否则后果自行承担......

支持或赞助

如果帮到你,并且你觉得很好用,请star一下,也可以用鸡付宝支给一块钱让我听听撒币的声音,有问题欢迎提出,反正我也不一定会改,哈哈......

人生忽如寄,怜取眼前人

昨夜西风凋碧树,独上高楼,望尽天涯路。——晏殊《蝶恋花》

衣带渐宽终不悔,为伊消得人憔悴。——柳永《凤栖梧》

众里寻他千百度,蓦然回首,那人却在,灯火阑珊处。——辛弃疾《青玉案》

weibo2markdown's People

Contributors

uchiha-peng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

weibo2markdown's Issues

macos 为啥不行用,一直卡着

请勿用于商业或非法用途,输入微博ID,如:223417235(非微博昵称),Enter键确认
:6161783533
?type=uid&value=6161783533
info: System.Net.Http.HttpClient.Default.LogicalHandler[100]
      Start processing HTTP request GET https://m.weibo.cn/api/container/getIndex?type=uid&value=6161783533
info: System.Net.Http.HttpClient.Default.ClientHandler[100]
      Sending HTTP request GET https://m.weibo.cn/api/container/getIndex?type=uid&value=6161783533
info: System.Net.Http.HttpClient.Default.ClientHandler[101]
      Received HTTP response headers after 1003.6818ms - 200
info: System.Net.Http.HttpClient.Default.LogicalHandler[101]
      End processing HTTP request after 1023.3477ms - 200

程序异常The given key was not present in the dictionary.

ERROR:按Ctrl+C键结束程序
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /Users/lion/sourcetree-workspace/blog/weibo-blog/weibo2markdown

dotnet --version
6.0.413

runtime用的是5.0
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=5.0.0&arch=x64&rid=osx.13-x64

出大问题了,抓取失败

有的账号会抓取失败。

本次抓取成功.... 本次抓取成功.... 本次抓取成功.... 本次抓取成功.... 出大问题了,抓取失败 at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable1 commandBatches, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList1 entries) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList1 entriesToSave)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(DbContext _, Boolean acceptAllChangesOnSuccess)
at Microsoft.EntityFrameworkCore.Storage.Internal.NoopExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func3 verifySucceeded)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)
at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
at Microsoft.EntityFrameworkCore.DbContext.SaveChanges()
at Weibo.Program.getWeiboList(String userId) in D:\code\c#\weibo2markdown\Program.cs:line 214`

感谢老哥,不过导出记录不全?

是从稳部落看到老哥的项目就过来了,因为我自己也有转markdown的需求。不过用win11发现导出记录有缺失?总共有230多条,但是实际只下载了100+。另外,下载的图片直链是加密的?好像markdown上是预览不了的。

anyhow,感谢老哥这个项目

下载的图片为0kb,检查后发现应该是图片链接失效

微博的防盗链似乎又变了,对照着图片连接尝试了一下,开头添加https://image.baidu.com/search/down?url=
打开的网页为空白。

搜了搜解决方案,一个是HTTP Header添加Referer ,值为 https://weibo.com/
参考1.2 https://mp.weixin.qq.com/s/LFX37OvOEUcGSdWYD0XWxQ

另外就是使用其他开头的链接,个人测试
https://i0.wp.com/图片地址 (图片地址要掉 https://)
https://cdn.ipfsscan.io/weibo/large/488c829bgw1es31sl8s7rg2091066gqc.gif
把域名部分改成 https://cdn.ipfsscan.io/weibo/
这两个方法可以访问到图片。

参考链接Semibold/Weibo-Picture-Store#127

希望作者可以看一下修复一下这个问题

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.