采集特定用户下面的视频
通过观察发现用户的下面的视频列表来自特定的API
翻页也是修改pn=的参数即可
通过API拿到的数据的格式类似
{"code":0,"message":"0","ttl":1,"data":{"list":{"tlist":{"1":{"tid":1,"count":1,"name":"动画"},"160":{"tid":160,"count":12,"name":"生活"},"36":{"tid":36,"count":221,"name":"科技"}},"vlist":[{"comment":201,"typeid":124,"play":15934,"pic":"//i2.hdslb.com/bfs/archive/97ee457053dd176de80f55813e480555fbbda6c2.jpg","subtitle":"","description":"其实治拖延的方就是赶紧做,组队互催有buff!!","copyright":"","title":"【心理学/焦虑】拖延者的3种类型","review":0,"author":"Psych2go中文站","mid":203230674,"created":1529253759,"length":"08:48","video_review":198,"aid":25106194,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":406,"typeid":124,"play":25498,"pic":"//i2.hdslb.com/bfs/archive/e2cddc6b6799eb30e83cf9420b2a39635e42052c.jpg","subtitle":"","description":"试试呗?","copyright":"","title":"【心理学】5个音乐影响焦虑抑郁的方式","review":0,"author":"Psych2go中文站","mid":203230674,"created":1528602485,"length":"08:22","video_review":159,"aid":24637224,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":70,"typeid":124,"play":6615,"pic":"//i1.hdslb.com/bfs/archive/2d2aa73d996e118c63e622726d509e9a697b74e0.jpg","subtitle":"","description":"请将音量放大200%!请将音量放大200%!请将音量放大200%!","copyright":"","title":"【科普】ASMR/自发性知觉经络反应是什么?","review":0,"author":"Psych2go中文站","mid":203230674,"created":1528602304,"length":"06:26","video_review":52,"aid":24636326,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":527,"typeid":124,"play":24429,"pic":"//i1.hdslb.com/bfs/archive/f5bcdae855f22253c737cb9dc8992b24a730dfdc.jpg","subtitle":"","description":"5大抑郁症类型:\n破坏性心境失调障碍 (曾为青少年抑郁症)\n重性抑郁障碍 av15606031\n持续性抑郁障碍 av17149244 建议 av19070302\n经前期烦躁障碍 可参考 Robyn Stein DeLuca的TEDx talk: the good news about PMS\n物质/药物引发的抑郁障碍 请自寻关键字\n仅是抛砖引玉,有问题请务必咨询专业人士!","copyright":"","title":"【心理学/DSM5】 抑郁类型知多少?","review":0,"author":"Psych2go中文站","mid":203230674,"created":1528040134,"length":"08:58","video_review":362,"aid":24348092,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":207,"typeid":124,"play":39946,"pic":"//i2.hdslb.com/bfs/archive/c42d55a96e0fbd0fbf9262de15b27742e15e73b1.jpg","subtitle":"","description":"与人们相处离不开察言观色这一关键能力的运用,这几个小提示来帮你指个路~\n\nPS: 心理狗会读心术是不可能的,只是说能理解,理解+1.理解+2,以及大概率或小概率的揣测。\n\n补充: 肢体语言av22982625 同理心av3410410","copyright":"","title":"【心理学】关于阅读人心的8个建议","review":0,"author":"Psych2go中文站","mid":203230674,"created":1527958327,"length":"08:00","video_review":153,"aid":24300211,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":838,"typeid":124,"play":43883,"pic":"//i1.hdslb.com/bfs/archive/ad14420d672370939d1e2282779737b104fdf58b.jpg","subtitle":"","description":"其实这是个长青话题了。教育和就职市场的青黄不接;大学教育对学生核心能力的培养的疏忽,昂贵的高等教育的成本vs.越来越触手可及的在线课程…… \n这些并不是说上学没什么用,只是当你未来目标不必用蹲几年大学来达成它时,也许放下一纸文凭,放手一搏做个实践派是更明智的决定。\n\n联动 从教学的角度看学生为何不喜欢学校 av16484547","copyright":"","title":"【教育】10个学校可能不适合你的迹象","review":0,"author":"Psych2go中文站","mid":203230674,"created":1527953389,"length":"12:24","video_review":529,"aid":24279469,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":148,"typeid":124,"play":9498,"pic":"//i1.hdslb.com/bfs/archive/e1080bae2b896e12f6f7de2c2e6753573b287266.jpg","subtitle":"","description":"偷吃很坏坏!不过视频开头的案例确实很尴尬,有能力还是尽量避免经济上对伴侣的过度依赖吧。","copyright":"","title":"【爱情】出轨有理?论偷吃背后的生理学","review":0,"author":"Psych2go中文站","mid":203230674,"created":1527936458,"length":"09:18","video_review":101,"aid":24280890,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":407,"typeid":124,"play":11525,"pic":"//i2.hdslb.com/bfs/archive/75656f3bda3dffe3c65edd37f36ccffdeb92560c.jpg","subtitle":"","description":"恋爱没什么特别,又有点特别。","copyright":"","title":"【LGBTQ+】艾滋?深柜?跨性别? 8大独特的恋爱困境-中英双字","review":0,"author":"Psych2go中文站","mid":203230674,"created":1527598260,"length":"12:24","video_review":85,"aid":24032632,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":200,"typeid":124,"play":60721,"pic":"//i0.hdslb.com/bfs/archive/a9f951dec02721e161fea0e32cd0253280eae723.jpg","subtitle":"","description":"应该说长期这么以为的话,可能就让一段关系决堤。简单说就是双方间的坦承,信任跟相互成长很重要(鸡汤)。不过恋爱就是会让人失去理智啊(x)!→av16243653","copyright":"","title":"【恋爱】10个可能摧毁伴侣关系的思维","review":0,"author":"Psych2go中文站","mid":203230674,"created":1526780213,"length":"10:38","video_review":201,"aid":23673931,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":217,"typeid":124,"play":16383,"pic":"//i0.hdslb.com/bfs/archive/07384923e08e6f95e35fd74b5f73106b4faa69ac.jpg","subtitle":"","description":"本视频旨在简述几种最常见的焦虑相关的障碍及其疗法一览,仅供参考,不过结合药物以及心理治疗算是比较常见的治疗方案了,你是有选择的。另外,一个视频通常是看不出你有没有患上这种疾病的,如发现自己有这种倾向,还请求助专业资源来诊断。\n\nPS: 严格地讲PTSD是属于创伤及压力相关(stressor-related或者说应激)障碍的类别,但ptsd常会伴随抑郁,焦虑,恐惧症一起影响着患者,在此澄清一下。我们制作的\u003cPTSD从常识误区到治疗\u003e的合集请移步 av22693580,焦虑相关的都在收藏夹可见。","copyright":"","title":"【心理学】5大焦虑障碍及治疗: OCD/GAD/Panic Disorder/SAD/PTSD","review":0,"author":"Psych2go中文站","mid":203230674,"created":1526779185,"length":"13:04","video_review":122,"aid":23673772,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":470,"typeid":124,"play":30631,"pic":"//i2.hdslb.com/bfs/archive/7980e6c8f4f6f9efc48e6a93076cd3748c8fbdc7.jpg","subtitle":"","description":"*修正翻译错误,感谢@格格酱的录像带 提醒* 惊恐障碍(panic disorder)是什么?有什么靠谱/不靠谱的治疗措施?小姐姐用克服自己恐慌障碍的亲身经历分享给大家做参考!联动 如何应对刚惊恐发作的小伙伴?av23364026","copyright":"","title":"【心理学】惊恐障碍是什么? Panic Disorder, what is it?","review":0,"author":"Psych2go中文站","mid":203230674,"created":1526157334,"length":"16:48","video_review":145,"aid":23363843,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":169,"typeid":124,"play":13058,"pic":"//i0.hdslb.com/bfs/archive/2a562add879bda3c3e43d36a44a738911a6c847b.jpg","subtitle":"","description":"惊恐发作发生时可能十分突然,这情况拖久了变成恐慌障碍就麻烦了,记住:早发现早治疗早康复。\n关于恐慌障碍的介绍请戳这篇av23363843\n本篇小视频提供了几个应对小贴士不时之需,如果遇到身边的人出现这种情况,记住:不要(跟着)慌。","copyright":"","title":"【心理学小贴士】如何应对刚惊恐发作的小伙伴?","review":0,"author":"Psych2go中文站","mid":203230674,"created":1526156159,"length":"08:00","video_review":78,"aid":23364026,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":939,"typeid":124,"play":326098,"pic":"//i1.hdslb.com/bfs/archive/e8ce861d589a0d97cdc247652d6dff5cb9b6b523.jpg","subtitle":"","description":"说实话这篇并非是有根有据的,这七步更像是演化自Helen Fisher的\"欲望Lust, 吸引Attraction, 依恋Attachment\"的三个步骤。恩,有眼缘还是第一的。\n推荐Helen Fisher: 爱情的四种类型 av17559747 坠入爱河的10大迹象av19567531 女性坠入爱河的五大前提av19476711 更多恋爱相关内容请戳我们频道或收藏夹","copyright":"","title":"【恋爱】男性坠入爱河的7个阶段","review":0,"author":"Psych2go中文站","mid":203230674,"created":1525520533,"length":"07:46","video_review":593,"aid":23026458,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":150,"typeid":124,"play":37565,"pic":"//i0.hdslb.com/bfs/archive/b0c4c5c8f0e6e17765d383d98e6ff0415e10505c.jpg","subtitle":"","description":"作为非口头沟通的一种,肢体语言传递出了人们的一些潜意识,仅供大家补充参考^ ^\n不过讲真有了好感也不代表着人家一定会答应交往啊是吧。\n联动 吸引力的9个心理学真相 av19433158","copyright":"","title":"【心理学】10个有关吸引力的肢体语言","review":0,"author":"Psych2go中文站","mid":203230674,"created":1525483155,"length":"08:04","video_review":240,"aid":22982625,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":2762,"typeid":124,"play":201285,"pic":"//i1.hdslb.com/bfs/archive/7a4e12a86b23e9e2ac968801156a393f71ea9b36.jpg","subtitle":"","description":"精神变态很危险,最危险的是他们不断用各种方法来放松你的警惕,发现时已经为时已晚。\n\n关联推荐: 判断精神变态的10个特征av14523456 5种你已经遇到反社会者还傻傻不知情的情境av15218381 你被卷入虐待关系的10个迹象av17558220","copyright":"","title":"【心理学】精神变态盯上你的10个迹象-10 Signs A Psychopath is Targeting You","review":0,"author":"Psych2go中文站","mid":203230674,"created":1525440367,"length":"09:48","video_review":2600,"aid":22979636,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":48,"typeid":39,"play":4186,"pic":"//i2.hdslb.com/bfs/archive/6a065b8217204a73fe44812ed41ae9b5bc6e9a9f.jpg","subtitle":"","description":"*修正部分内容* https://www.youtube.com/watch?v=-M8Hl5MUr8w\u0026t=76s\n教育学家肯·罗宾逊 Ken Ribonson结合自己生活的经历及丰富的见闻跟大家来了场一如以往幽默的谈天会。教育心理系合集av16484547","copyright":"","title":"什么是热情? 肯·罗宾逊 Ken Robinson on Passion-School of Life","review":0,"author":"Psych2go中文站","mid":203230674,"created":1525286469,"length":"50:23","video_review":22,"aid":22904392,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":363,"typeid":124,"play":52946,"pic":"//i0.hdslb.com/bfs/archive/0277874bc9ac141f08f4f213f03a43ffbd1f78c8.jpg","subtitle":"","description":"*修正翻译错误*\n这群连环杀手在非日常的荧幕上很常见,日常推荐剧Criminal Minds S01-S12。\n \n联动 10个心理变态的特征 av14523456","copyright":"","title":"【犯罪心理学】9种连环杀手","review":0,"author":"Psych2go中文站","mid":203230674,"created":1525020348,"length":"08:06","video_review":469,"aid":22750281,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":93,"typeid":124,"play":10249,"pic":"//i0.hdslb.com/bfs/archive/e01fb95f227c1491ee3b15c2885cd0c809566e2b.jpg","subtitle":"","description":"约会帮帮帮(O(∩_∩)O哈哈哈~) 吊桥效应,通过给予对方一些外部刺激,使得对方误以为脸红心跳的感觉来源于你的魅力。但是心跳虽好,可不要贪\"心\"o","copyright":"","title":"【吊桥效应】为啥约会看恐怖片这么灵?","review":0,"author":"Psych2go中文站","mid":203230674,"created":1524995276,"length":"05:24","video_review":59,"aid":22731440,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":230,"typeid":124,"play":15281,"pic":"//i1.hdslb.com/bfs/archive/fdb2439d816b577defb728066622a7403830c8fd.jpg","subtitle":"","description":"养只灵物乐趣多多,养之前记得做足功课哦^ ^ 各位主人们有什么建议吗?养了宠物之后对你有哪些影响呢?在评论区留言吧!","copyright":"","title":"【心理学】养只宠物带给你的益处","review":0,"author":"Psych2go中文站","mid":203230674,"created":1524992486,"length":"05:46","video_review":119,"aid":22729919,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":159,"typeid":124,"play":13990,"pic":"//i0.hdslb.com/bfs/archive/b338a0d2270601eb810d4779df2599b58acb0a0e.jpg","subtitle":"","description":"https://www.youtube.com/watch?v=qOkJeAbddDw\nWhat Is PTSD, Exactly?-Life Noggin \n翻|校|轴|二|后 MooseRyvee 冥河忘川 刘晓晓 Nami酱 Aégis \n\n大家都以为PTSD只会出现在战争的士兵身上,但其实大部分患上PTSD的人并不是士兵而是......联动 自恋式教养的惊人后果 av19981412 游戏与清醒梦av20818517 哈利波特av22408653","copyright":"","title":"【心理学】PTSD: 创伤之后 从科普到自救的完全指南","review":0,"author":"Psych2go中文站","mid":203230674,"created":1524922866,"length":"22:41","video_review":50,"aid":22693580,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":170,"typeid":124,"play":11627,"pic":"//i2.hdslb.com/bfs/archive/4eb42e08ea6ec930642388ccdfe7d2d4cdce8b86.jpg","subtitle":"","description":"就问你酷不酷,清醒梦!","copyright":"","title":"【清醒梦】游戏赐你超能力(活在梦里)?","review":0,"author":"Psych2go中文站","mid":203230674,"created":1524336712,"length":"06:20","video_review":115,"aid":22408653,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":50,"typeid":124,"play":3927,"pic":"//i1.hdslb.com/bfs/archive/1a3f6b0f403d2c12f8c31d4ddea324a8ab50173f.jpg","subtitle":"","description":"玩电子游戏(有暴力元素)是否导致暴力倾向简直是本本心理学教科书必提及的议题,现在科研有了新进展。\n关于游戏是否在毒害我们则是另一个话题了,可看看这个https://www.zhihu.com/question/32306037\n\n情绪分析的AI估计就是拿来凑数的,虽然对自闭症人群有帮助, 幻想下他们对着个表跟人对话学习认知人的各种情绪(...)","copyright":"","title":"【心理学】游戏导致暴力倾向? MIT研发AI腕表准确分析人类情绪?","review":0,"author":"Psych2go中文站","mid":203230674,"created":1524335979,"length":"08:41","video_review":40,"aid":22406268,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":107,"typeid":124,"play":15094,"pic":"//i2.hdslb.com/bfs/archive/5c3b9e15f2a738ecdf0eb1fcbf90b7aefda63f71.jpg","subtitle":"","description":"那么问题来了,爱情是可以如此被具体化的吗? (doge脸)\n补充阅读 https://www.zhihu.com/question/35480487","copyright":"","title":"【心理学】教科书里的爱情三角理论","review":0,"author":"Psych2go中文站","mid":203230674,"created":1523801306,"length":"09:42","video_review":110,"aid":22144770,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":1688,"typeid":124,"play":64352,"pic":"//i1.hdslb.com/bfs/archive/ab7126ab1657f67cbb820169d5372094b1dde2c5.jpg","subtitle":"","description":"16个很绝妙的形容!!如果你被诊断有抑郁症,来评论区说说你的感受吧\n\n你抑郁的5个迹象av15606031 自我调节小贴士av18041025 欢迎戳我们收藏夹了解更多","copyright":"","title":"\"抑郁症像什么\"的16个比喻","review":0,"author":"Psych2go中文站","mid":203230674,"created":1523800098,"length":"09:46","video_review":869,"aid":22142119,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":754,"typeid":124,"play":38803,"pic":"//i1.hdslb.com/bfs/archive/57c5ffcb5838a3b3b330d7372ac0f346aa3aaf48.jpg","subtitle":"","description":"一些有关内向者的小知识!\n推荐喜欢追根究底的小伙伴们围观这个 内向的科学av18240068","copyright":"","title":"【心理学】内向是怎样的?","review":0,"author":"Psych2go中文站","mid":203230674,"created":1523789494,"length":"08:08","video_review":476,"aid":22136335,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":764,"typeid":124,"play":48828,"pic":"//i1.hdslb.com/bfs/archive/26678a3b846ffe46fd0d9af9274c50e4dfd3f204.jpg","subtitle":"","description":"这视频是个小引子,能助你了解大致的区别,请务必啃啃专业版的→ www.zhihu.com/question/29974060/answer/220755862\n关联推荐:\n反社会=不合群?av14906442 找出潜伏的反社会者av15218381 精神变态10个特征 av14523456","copyright":"","title":"【心理学】反社会者和精神变态…他们很不一样","review":0,"author":"Psych2go中文站","mid":203230674,"created":1523740101,"length":"05:38","video_review":258,"aid":22110239,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":159,"typeid":124,"play":12022,"pic":"//i0.hdslb.com/bfs/archive/1d060a9da95596352fd8da492b99daa82566b6e8.jpg","subtitle":"","description":"这也解释了我们如何让抱怨这种态度(或者行为)成为习惯的原理。\n你在生活中有遇到过抱怨成性的人吗?你是怎么看待他们的呢?他们对你又有怎样的影响呢?来评论区吐槽吧!\n\n关联 皮质醇与战逃反应 av18815927","copyright":"","title":"【心理学】抱怨...很健康?","review":0,"author":"Psych2go中文站","mid":203230674,"created":1523736897,"length":"06:28","video_review":67,"aid":22109451,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":478,"typeid":124,"play":16471,"pic":"//i1.hdslb.com/bfs/archive/532f98d2710e3ce008d0b79189b51ea5fc4c1eee.jpg","subtitle":"","description":"*修正字幕*\n与操纵狂的有效沟通,助勇士您取回自己生活主导权的几个小贴士!\n欢迎围观下面的一些关联投稿,并在评论区分享下您的经历。\n\n+认知+\n心理变态的迹象av14523456|反社会者交往的迹象av14917534\n你被卷入虐待关系的迹象(煤油灯下)av17558220\n+应对+\n怎么应对自恋狂av21464726|放手吧av17745087","copyright":"","title":"【心理学小贴士】如何应对操纵狂?","review":0,"author":"Psych2go中文站","mid":203230674,"created":1523114312,"length":"10:38","video_review":110,"aid":21806416,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":524,"typeid":124,"play":35766,"pic":"//i0.hdslb.com/bfs/archive/090aa936c989c935b724deaaa4f2b20a670e7a80.jpg","subtitle":"","description":"看到路边的流浪汉,你是怎样的感受呢?\n同情,怜悯,共情(有时也称为同理心),慈悲,还有利他主义,主要是从你有无相同的亲身感受、有没有做出行动来做区分的。\n视频说的比较紧凑,建议整理一下笔记帮助自己区分几个概念~\n联动→旁观者效应av15816049 遇到反社会者还不自知的情境av15218381/","copyright":"","title":"【心理学】你是同情、共情、怜悯,还是利他主义?","review":0,"author":"Psych2go中文站","mid":203230674,"created":1522584601,"length":"08:50","video_review":300,"aid":21517807,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0},{"comment":471,"typeid":124,"play":49727,"pic":"//i2.hdslb.com/bfs/archive/b724daa0cb7c7d10830c1fe6298729112c60f53c.jpg","subtitle":"","description":"如果躲不开,怎么妥善应对自恋狂?\n=推荐=\n[ ]自恋的分类方式及自恋型人格障碍的介绍 av15111606\n[ ]你在与自恋者交往的迹象av20118307\n[ ]自恋式教养的6个惊人后果av19981412\n自恋专栏推荐→https://www.psychologytoday.com/us/blog/understanding-narcissism","copyright":"","title":"【心理学小贴士】如果躲不开,怎么妥善应对自恋狂?","review":0,"author":"Psych2go中文站","mid":203230674,"created":1522493992,"length":"12:44","video_review":242,"aid":21464726,"bvid":"","hide_click":false,"is_pay":0,"is_union_video":0}]},"page":{"count":234,"pn":5,"ps":30}}}
通过解析能拿到所有的视频的aid,,这样自己在前面拼接 https://www.bilibili.com/video/av 就是每个视频的播放详情页面了
通过调研文章发现有很多手段都可以下载B站视频包括
"baseUrl":"http://upos-hz-mirrorcosu.acgvideo.com/upgcxcode/46/41/122884146/122884146-1-30066.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1573797253&gen=playurl&os=cosu&oi=1033176876&trid=e63c24f5a2c943a4a41ab482937fe72cu&platform=pc&upsig=155ad27902194f2fdcdbdc6702ee31a1&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,platform&mid=14574986"
但是这个url直接请求会403,太麻烦了,还要自己合并视频什么的,所以借助了其他手段
you-get 是python3的一个工具。可以直接进行视频的下载。安装使用
pip3 install you-get
使用方式直接在命令后面接具体的视频页面URL即可
you-get https://www.bilibili.com/video/av71940906
输出如下
F:\PycharmProjects\test\venv\Scripts>
F:\PycharmProjects\test\venv\Scripts>you-get https://www.bilibili.com/video/av71940906
site: Bilibili
title: 10个迹象反映你比大多数人内心强大
stream:
- format: dash-flv720
container: mp4
quality: 高清 720P
size: 11.7 MiB (12252332 bytes)
# download-with: you-get --format=dash-flv720 [URL]
Downloading 10个迹象反映你比大多数人内心强大.mp4 ...
100% ( 11.7/ 11.7MB) ├████████████████████████████████████████┤[2/2] 988 kB/s
Merging video parts... Merged into 10个迹象反映你比大多数人内心强大.mp4
Downloading 10个迹象反映你比大多数人内心强大.cmt.xml ...
F:\PycharmProjects\test\venv\Scripts>
这样我们的视频就下载好了,是不是很强,不用自己破解流和合并视频
下载下来的视频是有水印的,需要我们去除水印,这里我使用的是 ffmeg,命令为
ffmpeg -i 1.flv -filter_complex "delogo=x=1017:y=21:w=246:h=44" 2.flv
如果有不知道怎么获取水印坐标的同学,其实很简单,先把视频截取一张图片,例如,我们视频截取后就是使用 画图的工具,进行截取,在左下角会有坐标的显示
这样我们就得到了左上角的坐标,然后进行框选,拿到宽和高
这个没有太具体的,只要能把水印覆盖到就行。
使用命令后的结果如下:
C:\Users\Administrator\Desktop>ffmpeg -i 1.flv -filter_complex "delogo=x=1002:y=26:w=240:h=30" 11.flv
ffmpeg version N-92806-g70c86deb8e Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20181201
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 25.100 / 56. 25.100
libavcodec 58. 42.104 / 58. 42.104
libavformat 58. 25.100 / 58. 25.100
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 46.101 / 7. 46.101
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
Input #0, flv, from '1.flv':
Metadata:
description : Packed by Bilibili XCoder v1.0(fixed_gap:False)
metadatacreator : Yet Another Metadata Injector for FLV - Version 1.9
hasKeyframes : true
hasVideo : true
hasAudio : true
hasMetadata : true
canSeekToEnd : false
datasize : 23750333
videosize : 19199443
audiosize : 4477738
lasttimestamp : 273
lastkeyframetimestamp: 262
lastkeyframelocation: 23088237
Duration: 00:09:59.00, start: 0.083000, bitrate: 633 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 561 kb/s, 24 fps, 24 tbr, 1k tbn, 48 tbc
Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 127 kb/s
Stream mapping:
Stream #0:0 (h264) -> delogo (graph 0)
delogo (graph 0) -> Stream #0:0 (flv)
Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, flv, to '11.flv':
Metadata:
description : Packed by Bilibili XCoder v1.0(fixed_gap:False)
metadatacreator : Yet Another Metadata Injector for FLV - Version 1.9
hasKeyframes : true
hasVideo : true
hasAudio : true
hasMetadata : true
canSeekToEnd : false
datasize : 23750333
videosize : 19199443
audiosize : 4477738
lasttimestamp : 273
lastkeyframetimestamp: 262
lastkeyframelocation: 23088237
encoder : Lavf58.25.100
Stream #0:0: Video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 24 fps, 1k tbn, 24 tbc
Metadata:
encoder : Lavc58.42.104 flv
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 44100 Hz, stereo, fltp
Metadata:
encoder : Lavc58.42.104 libmp3lame
frame= 52 fps=0.0 q=31.0 Lsize= 392kB time=00:00:02.32 bitrate=1379.7kbits/s speed=6.34x
video:352kB audio:37kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.716579%
Exiting normally, received signal 2.
我们看看效果
很完美哈,打完收工