爬取最新QQ音乐下载地址分析

爬取最新QQ音乐下载地址分析以下均以歌名 不要说话 分析 通过音乐名字搜索 12345678910111213'qq' => [ 'method' => 'GET', 'url' => 'http://c.y.qq.com/soso/fcgi-bin/client_search_cp', 'referer' => 'http://m.y.qq.com', 'proxy' => false, 'body' => [ 'w' => $query, 'p' => $page, 'n' => 10, 'format' => 'json' ], 'user-agent' => 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1'] 即组成 http://c.y.qq.com/soso/fcgi-bin/client_search_cp?w=不要说话&p=1&n=10&format=json 通过定义的useragent通过Get取得的内容如下: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102{ "code":0, "data":{ "keyword":"不要说话", "priority":0, "qc":[ ], "semantic":{ "curnum":0, "curpage":1, "list":[ ], "totalnum":0 }, "song":{ "curnum":10, "curpage":1, "list":[ { "albumid":35182, "albummid":"000J1pJ50cDCVE", "albumname":"不想放手", "albumname_hilight":"不想放手", "alertid":23, "belongCD":0, "cdIdx":7, "chinesesinger":0, "docid":"14691017891116423173", "grp":[ ], "interval":285, "isonly":0, "lyric":"《时尚先生》电影主题曲", "lyric_hilight":"《时尚先生》电影主题曲", "media_mid":"004cc3OU0GLJHb", "msgid":16, "newStatus":2, "nt":1413023447, "pay":{ "payalbum":0, "payalbumprice":0, "paydownload":1, "payinfo":1, "payplay":0, "paytrackmouth":1, "paytrackprice":200 }, "preview":{ "trybegin":74064, "tryend":102207, "trysize":960887 }, "pubtime":1214755200, "pure":0, "singer":[ { "id":143, "mid":"003Nz2So3XXYek", "name":"陈奕迅", "name_hilight":"陈奕迅" } ], "size128":4566820, "size320":11416753, "sizeape":0, "sizeflac":30255204, "sizeogg":6051718, "songid":9059607, "songmid":"002B2EAA3brD5b", "songname":"不要说话", "songname_hilight":"<em>不要说话</em>", "strMediaMid":"004cc3OU0GLJHb", "stream":1, "switch":16888579, "t":1, "tag":11, "type":0, "ver":0, "vid":"e0011thbfzs" } ], "totalnum":600 }, "tab":0, "taglist":[ ], "totaltime":0, "zhida":{ "chinesesinger":0, "type":0 } }, "message":"", "notice":"", "subcode":0, "time":1632975151, "tips":""} 通过返回的json可以取得歌曲的songmid为 002B2EAA3brD5b 通过歌曲的songmid取得音频信息 1234567891011'qq' => [ 'method' => 'GET', 'url' => 'http://c.y.qq.com/v8/fcg-bin/fcg_play_single_song.fcg', 'referer' => 'http://m.y.qq.com', 'proxy' => false, 'body' => [ 'songmid' => $songid, 'format' => 'json' ], 'user-agent' => 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1'] 即通过 http://c.y.qq.com/v8/fcg-bin/fcg_play_single_song.fcg?songmid=002B2EAA3brD5b&format=json 和自定义的头,返回的json如下: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124{ "code":0, "data":[ { "action":{ "alert":21, "icons":8535932, "msgdown":0, "msgfav":0, "msgid":14, "msgpay":6, "msgshare":0, "switch":16888579 }, "aid":0, "album":{ "id":35182, "mid":"000J1pJ50cDCVE", "name":"不想放手", "pmid":"000J1pJ50cDCVE_3", "subtitle":"《时尚先生》电影主题曲", "time_public":"2008-06-30", "title":"不想放手" }, "bpm":66, "data_type":0, "es":"", "file":{ "b_30s":0, "e_30s":60000, "hires_bitdepth":0, "hires_sample":0, "media_mid":"004cc3OU0GLJHb", "size_128mp3":4566820, "size_192aac":6893143, "size_192ogg":6051718, "size_24aac":0, "size_320mp3":11416753, "size_48aac":1733017, "size_96aac":3476533, "size_96ogg":3079411, "size_ape":0, "size_dts":0, "size_flac":30255204, "size_hires":0, "size_try":960887, "try_begin":74064, "try_end":102207, "url":"" }, "fnote":4009, "genre":1, "id":9059607, "index_album":7, "index_cd":0, "interval":285, "isonly":0, "ksong":{ "id":4841, "mid":"000A57lN1qgVTQ" }, "label":"0", "language":0, "mid":"002B2EAA3brD5b", "modify_stamp":0, "mv":{ "id":173498, "name":"", "title":"", "vid":"e0011thbfzs", "vt":0 }, "name":"不要说话", "ov":0, "pay":{ "pay_down":1, "pay_month":1, "pay_play":0, "pay_status":0, "price_album":0, "price_track":200, "time_free":0 }, "sa":0, "singer":[ { "id":143, "mid":"003Nz2So3XXYek", "name":"陈奕迅", "pmid":"", "title":"陈奕迅", "type":0, "uin":0 } ], "status":0, "subtitle":"《时尚先生》电影主题曲", "tid":0, "time_public":"2008-06-30", "title":"不要说话", "trace":"", "type":0, "url":"", "version":0, "volume":{ "gain":-8.178000000000001, "lra":9.406000000000001, "peak":1 } } ], "url":{ "9059607":"ws.stream.qqmusic.qq.com/C100002B2EAA3brD5b.m4a?fromtag=38" }, "url1":{ }, "extra_data":[ ], "joox":0, "joox_login":1, "msgid":0} 通过登录QQ取得guid和uin进而取得vkeyQQ音乐的地址如下: dl.stream.qqmusic.qq.com/C400000QCwge3B6Ad1.m4a?vkey= 6FBECDE68E94D9E5B1F6731C5A8D83AE2DE961466D2CF64694D86F94590B3E27592575D38322394478AFC921DA703B6805A4278DE54344F1&GUID= 1849502645&UIN=1000&fromtag=66其实就是:dl.stream.qqmusic.qq.com/C400$songmid.m4a?vkey=$vkey的值&guid=$guid值&uin=$uin&fromtag=66 guid需要QQ登录后才能取得,uin就是你登录的QQ号,经测试guid和qq号可以任意输出,而不需要登录,仅客户端的VIP歌曲无效根据guid和uin通过https://u.y.qq.com/cgi-bin/musicu.fcg取得vkey,取得过程可以看下面的python代码 python代码1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677import requestsimport jsonclass QQmusic: def __init__(self): self.headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36'} self.sl = [] self.musicList = [] # 获取页面 def getPage(self,url,headers): res = requests.get(url,headers = headers) res.encoding = 'utf-8' return res # 获取音乐songmid def getSongmid(self): num = int(input('请输入获取条数:')) # num = 20 #name = input('请输入歌名或歌手:') name = '张学友' url = 'http://c.y.qq.com/soso/fcgi-bin/client_search_cp?p=1&n=%d&w=%s'%(num,name) # 搜索音乐 res = self.getPage(url,headers=self.headers) print(res.text) html = res.text html = html[9:] html = html[:-1] # 获取songmid js = json.loads(html) songlist = js['data']['song']['list'] for song in songlist: print(song) songmid = song['songmid'] name = song['songname'] self.sl.append((name,songmid)) print('获取成功songmid') # 获取音乐资源,guid是登录后才能获取,nin也是 def getVkey(self): guid = 7347620869 #guid = input('请输入guid:') #经过测试不用登录也能获取vkey,但限制仅能客户端播放的除外 uin = 0 #input('请输入uin:') for s in self.sl: print('开始获取资源') # 获取vkey,purl name = s[0] songmid = s[1] keyUrl = 'http://u.y.qq.com/cgi-bin/musicu.fcg?&data={"req":{"param":{"guid":"%s"}},"req_0":{"module":"vkey.GetVkeyServer","method":"CgiGetVkey","param":{"guid":"%s","songmid":["%s"],"uin":"%s"}},"comm":{"uin":%s}}'%(guid,guid,songmid,uin,uin) res = self.getPage(keyUrl,headers=self.headers) print(res.text) html = res.text keyjs = json.loads(html) purl = keyjs['req_0']['data']['midurlinfo'][0]['purl'] if len(purl)==0 : #仅限客户端播放的音乐purl会为空 continue # 拼凑资源url url = 'http://dl.stream.qqmusic.qq.com/' + purl self.musicList.append((name,url)) print('资源地址获取成功') # 下载音乐 def downloadMusic(self): for m in self.musicList: url = m[1] res = self.getPage(url,headers=self.headers) music = res.content name = m[0] + '.mp3' with open(name, 'wb') as f: f.write(music) print('下载OK') f.closedQQ = QQmusic()QQ.getSongmid()QQ.getVkey()QQ.downloadMusic()

中国式婚姻真相_静音

无数个婚姻细节曝光,生活实苦,劝你多体谅! 我懂你的不易,你理解我的辛苦,这才是婚姻幸福的真相。 生活中,很多女人都梦想着嫁个有钱人,她们单纯的憧憬有钱男人会想宠着自己。于是,她们纷纷把赌注压在一个个有钱的。男人一种骨子里的骄傲和对别人的蔑视,他们以为对别人的一点好就是全部,因此常常抱着施舍的态度对待所有的人,即使妻子也不例外。可爱情不是施舍,是爱人灵魂之间的沟通和认同,一个女人如果从丈夫那里得到的是带有施舍的爱。那么,她在他面前就永远跪着,总有一天,她会累的撑不住。婚姻里,当你选择了金钱,那就意味着在未来的日子里,你可能锦衣玉食,不用吃钱方面的苦,却活得寂寞。 婚姻是夫妻一辈子的事业,要付出努力去经营,婚姻正是在夫妻携手跨越一次又一次的难坎之后才越发丰富有内涵,才越发显现白头到老的弥足珍贵,婚姻也才散发出她真正的魅力。

坚不可摧-励志激情演讲视频

坚不可摧-励志激情演讲视频 中文翻译: 你无法把点滴与未来联系,只能通过回顾才能看见。所以你必须相信过的点击能串联未来。你必须有信念,不管那是你的胆识、命运、人生还是因果报应,因为把过去点滴串联起来,才能有信念忠于自我。即使你的选择和别人不一样,这会使你与众不同。你的时间是有限的,不要浪费在其他人的生命当中,别受教条约束,别活在其他人对你的期望之中,别让批评抹去了你内心的声音。你得找到你所爱的东西,包括你热爱的事业和你的伴侣。你的工作将会占据你生命的大部分,相信你做的工作是对的,你才能发自内心得到满足。而只有爱你所有的事,才能成就不凡。如果你还没找到,那继续找,别安逸下来。有勇气顺从自己的内心和直觉,你的内心早就知道你未来的梦想。但是你不可能一帆风顺,大多数人轻易放弃,但你知道人的意志有多强大吗?意志是无可比拟的坚强又富有任性的!任何人在财务、感情生活、健康良好的环境中都能感到幸福,任何人都能自得其满,任何人都能有伟大的理想,任何人在任何的环境下都能有信念。真正试验你的信念、信仰和意志,是当你被击倒的时候。起身而行需要勇气,被击倒仍能谦虚,需要有勇气放下并重新开始。恐惧,扼杀梦想,恐惧,扼杀希望,恐惧,使人一蹶不振,恐惧使你苍老,阻止你去做能做到的事。但是,它也会使你麻木不仁。每个情绪起伏,仍然一无所成。但是每个原则,是自我的承诺。你的喜怒哀乐,最后也许什么都没有。但是每次下决心,都是一种承诺。你们有些人,至今尚未成功,那是因为你们过于情绪化。你被情绪所主导,像是早上心情不好,不想起床?谁想?每天你不面对自己的梦想,你也许会把目标延后整整六个月,或是一年!就是没有起身鞭策自己的那一瞬间。你不晓得自己退后了多少!别让你的情感控制你!我们是情感的动物,但是你必须管理你自己的情感!你要是不能管理情感,你将会被吞噬!你想要全力以赴,毫不保留。当你想改变的时候,不会很容易,如果很容易的话,每个人都做到啦!但是你认真,全力以赴!我是主导者,主宰着自我。我不会被外在事物打击我,摧毁我,我重新站起来,而我会变得更好、更加坚强。你必须下定决心,这是你的意义。如果这时你想要的梦,不论那是健康或是功成名就,对你的人生负完全的责任。接受现在的自己,并且相信自己能做的更好。你可以把每一天当做最后一天在过!活出你的激情来!拿出魄力来!每天不断鞭策自己做的更好!人生的最后一章尚未写下,昨日种种的事情并不重要,你发生了什么也没关系。重要的是,你要怎么做?今年我要使梦想成为现实!我甚至不想再讲了。我可以的!我可以的!我可以的!我觉得坚持对每个人都重要,不要放弃,不要妥协,每件事都有方法。 英文稿:You can’t connect the dots lookingforward; you can only connect them lookingbackwards. So you have to trust that the dots will somehow connect in your future. Youhave to trust in something: your gut, destiny, life, karma, whatever. Because believing thatthe dots will connect down the road, will give you the confidence to follow your heart, even when it lead you off the well worn path. And that will make all the difference. Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma, which is living with the results of other people’s thinking. Don’tlet the noise of others’ opinions drown out your own inner voice. You’ve got to find what you love. And that is as true for your work as it is for your lovers. Your work is going to fill a large part of your life and the only way to be truly satisfied is todo what you believe is great work. And the only way to do great work is to love what you do. If you haven’t found it yet, keep looking, and don’tsettle. Have the courage to follow your heart and intuition, they somehow already know what you truly want to become. You’re going to have some ups and you’re goning to have some downs. Most people giveup on themselves easily. You know the human spirit is powerful?! There is nothing aspowerful. It’s hard to kill the human spirit! Anybody can feel good when they have theirhealth, their bills are paid, they have happy relationships. Anybody can be positive then,anybody can have a larger vision then, anybody can have faith under those kinds ofcircumstances. The real challenge of growth, mentally, emotionally and spiritually comeswhen you get knocked down. It takes courage to act. Part of being hungry when you been defeated. It takes courage to start over again. Fear kills dreams. Fear kills hope. Fear, put people in the hospital. Fear can age you, canhold you back from doing something that you know within yourself that you are capable of doing, but it will paralyze you. At the end of your feelings is nothing, but at the end of every principle is a promise. Behindyour little feelings, it might not be absolutely not at the end of your little feelings. Butbehind every principle is a promise. And some of you in your life, the reason why you notat your goal right now, because of your just all about you feelings. All on your feelings, you don’t feel like waking up, so who does? Everydayyou say “no” to your dreams, you mightbe pushing your dreams back a whole six months, a whole year! That one single day, that one day you didn’t get up could have pushed your stuff back, I don’t know how long. Don’t allow your emotions to controlyou. We are emotional, but what you want to begin to discipline your emotion. If you don’tdiscipline and contain your emotion, they will use you. You want it, and you are going to go all out to have it. It’s not going to be easy, when you want to change. It’s not easy. If it were in fact easy, everybody would do it. But ifyou’re serious, you’ll go all out. I’m in control here. I’m not going to let this get me down;I’m not going to let this destroy me. I’m coming back! And I’ll be stronger and better because ofit! You have got to make a declaration, that this is what you stand for! You’re standing up for your dreams;you’restanding up for peace of mind, you standing up for health. Take full responsibility for your life! Acceptwhere you are and the responsibility that you’re going to take yourself where you want to go. You can decide that I am going to live each day as if it were my last! Live your life withpassion! With some drive! Decided that your change to push yourself. The last chapter to your life has not been written yet, and it doesn’t matter about what happened yesterday. Itdoesn’t matter about what happened to you, what matter is: what are you going to do about it? This year I would make before this goal become a real. I won’t talk about itanymore. I can, I can, I can! To persevere I think is important for everybody, don’t give up, don’t give in. There’s always an answer to everything.

纯js美化alert弹出窗口

纯js实现自定义弹窗,美化alert窗口众所周知,浏览器自带的原生弹窗很不美观,而且功能比较单一,绝大部分时候我们都会按照设计图自定义弹窗或者直接使用注入layer的弹窗等等。前段时间在慕课网上看到了一个自定义弹窗的实现,自己顺便就学习尝试写了下,下面是主要的实现代码并添加了比较详细的注释,分享出来供大家参考。(代码用了ES6部分写法如需兼容低版本浏览器请把相关代码转成es5写法,后面有时间更新为一个兼容性较好的es5版本) HTML部分:(没什么内容 放置一个按钮调用函数,js中调用实例即可供参考) 1234567891011121314151617181920212223242526272829303132<!DOCTYPE html><html><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>自定义弹窗</title> <link rel="stylesheet" href="alert.css"></head><body> <button>Click me</button> <script src="index.js"></script> <script> document.querySelector("button").addEventListener("click",()=>{ new $Msg({ content:"我的自定义弹窗好了", type:"success", cancle:function(){ let cancle = new $Msg({ content:"我是取消后的回调" }) }, confirm:function(){ new $Msg({content:"我是确定后的回调"}) } }) }) </script></body></html> 样式部分:也放出来供参考,样式可以根据自己的设计图自行更改即可 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132/* 弹出框最外层 */.msg__wrap { position: fixed; top: 50%; left: 50%; z-index: 10; transition: all .3s; transform: translate(-50%, -50%) scale(0, 0); max-width: 50%; background: #fff; box-shadow: 0 0 10px #eee; font-size: 10px; } /* 弹出框头部 */ .msg__wrap .msg-header { padding: 10px 10px 0 10px; font-size: 1.8em; } .msg__wrap .msg-header .msg-header-close-button { float: right; cursor: pointer; } /* 弹出框中部 */ .msg__wrap .msg-body { padding: 10px 10px 10px 10px; display: flex; } /* 图标 */ .msg__wrap .msg-body .msg-body-icon{ width: 80px; } .msg__wrap .msg-body .msg-body-icon div{ width: 45px; height: 45px; margin: 0 auto; line-height: 45px; color: #fff; border-radius: 50% 50%; font-size: 2em; } .msg__wrap .msg-body .msg-body-icon .msg-body-icon-success{ background: #32a323; text-align: center; } .msg__wrap .msg-body .msg-body-icon .msg-body-icon-success::after{ content: "成"; } .msg__wrap .msg-body .msg-body-icon .msg-body-icon-wrong{ background: #ff8080; text-align: center; } .msg__wrap .msg-body .msg-body-icon .msg-body-icon-wrong::after{ content: "误"; } .msg__wrap .msg-body .msg-body-icon .msg-body-icon-info{ background: #80b7ff; text-align: center; } .msg__wrap .msg-body .msg-body-icon .msg-body-icon-info::after{ content: "注"; } /* 内容 */ .msg__wrap .msg-body .msg-body-content{ min-width: 200px; font-size: 1.5em; word-break: break-all; display: flex; align-items: center; padding-left: 10px; box-sizing: border-box; } /* 弹出框底部 */ .msg__wrap .msg-footer { padding: 0 10px 10px 10px; display: flex; flex-direction: row-reverse; } .msg__wrap .msg-footer .msg-footer-btn { width: 50px; height: 30px; border: 0 none; color: #fff; outline: none; font-size: 1em; border-radius: 2px; margin-left: 5px; cursor: pointer; } .msg__wrap .msg-footer .msg-footer-cancel-button{ background-color: #ff3b3b; } .msg__wrap .msg-footer .msg-footer-cancel-button:active{ background-color: #ff6f6f; } .msg__wrap .msg-footer .msg-footer-confirm-button{ background-color: #4896f0; } .msg__wrap .msg-footer .msg-footer-confirm-button:active{ background-color: #1d5fac; } /* 遮罩层 */ .msg__overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 5; background-color: rgba(0, 0, 0, .4); transition: all .3s; opacity: 0; } JS部分:下面是最主要的部分,js方法及交互。自己封装自定义组件均可以此为参考,封装自己的组件。 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208/* *自定义弹窗 *///自执行函数 形成封闭的作用域 避免全局污染 //传入windwo和document对象 相当于将window和document作为了作用域中的局部变量,//就不需要内部函数沿着作用域链再查找到最顶层的window 提高运行效率。(function (window, document) { //定义一个构造函数Msg 作为弹窗实例的构造函数。 let Msg = function (options) { //执行初始化操作 this._init(options); } //定义初始化方法 并对方法传递的参数进行初始化 Msg.prototype = { _init({ content = "", //文本内容 type = "info", //信息类型 useHTML = false, //是否解析html字符串 showIcon = true, //是否展示弹窗图标 confirm = null, //确认后得回调 cancle = null, //取消后得回调 footer = true, //是否显示底部的确认按钮 header = true, //是否显示头部信息及关闭按钮 title = "提示", //弹窗标题 contentStyle = {}, //内容样式 contentFontSize = "1.5em", //内容字体大小 btnName = ["确定", "取消"] //按钮文字内容 }) { //将传入的值绑定到this上 this.content = content; this.type = type; this.useHTML = useHTML; this.showIcon = showIcon; this.confirm = confirm; this.cancle = cancle; this.footer = footer; this.header = header; this.title = title; this.contentStyle = contentStyle; this.contentFontSize = contentFontSize; this.btnName = btnName; //执行创建元素方法 this._creatElement(); //显示弹窗及遮罩 this._show({ el: this._el, overlay: this._overlay }); //绑定事件处理函数 this._bind({ el: this._el, overlay: this._overlay }); }, //创建弹窗元素方法 _creatElement() { //创建最外层得包裹元素 let wrap = document.createElement("div"); wrap.className = "msg__wrap"; //定义弹窗得两个按钮 const [confirmBtnName, cancelBtnName] = this.btnName; //判断是否显示弹窗标题 const headerHTML = this.header ? `<div class="msg-header"> <span>${this.title}</span> <span class="msg-header-close-button">×</span> </div>` : ""; //判断是否显示图标 const iconHTML = this.showIcon ? `<div class="msg-body-icon"> <div class="msg-body-icon-${this.type}"></div> </div>` : ""; //判断是否显示弹窗底部按钮 const footerHTML = this.footer ? `<div class="msg-footer"> <button class="msg-footer-btn msg-footer-cancel-button">${cancelBtnName}</button> <button class="msg-footer-btn msg-footer-confirm-button">${confirmBtnName}</button> </div>` : ""; //拼接完整html const innerHTML = `${headerHTML} <div class="msg-body"> ${iconHTML} <div class="msg-body-content"></div> </div> ${footerHTML}`; //将拼接的html赋值到wrap中 wrap.innerHTML = innerHTML; //把自定义的样式进行合并 const contentStyle = { fontSize: this.contentFontSize, ...this.contentStyle } //获取内容所属DOM let content = wrap.querySelector(".msg-body .msg-body-content"); //将传过来的样式添加到contentDOM for (const key in contentStyle) { if (contentStyle.hasOwnProperty(key)) { content.style[key] = contentStyle[key]; } } //给弹窗的conntent赋值 if (this.useHTML) { content.innerHTML = this.content; } else { content.innerText = this.content; } //创建遮罩层 let overlay = document.createElement("div"); overlay.className = "msg__overlay"; //把dom挂载到当前实例上 this._overlay = overlay; this._el = wrap; }, //弹窗展现方法 _show({ el, overlay }) { //把弹窗的dom和遮罩插入到页面中 document.body.appendChild(el); document.body.appendChild(overlay); //将弹窗显示出来 timeout进行异步处理显示动画 setTimeout(() => { el.style.transform = "translate(-50%,-50%) scale(1,1)"; overlay.style.opacity = "1"; }) }, //关闭弹窗方法 _close({ el, overlay }) { //隐藏dom el.style.transform = "translate(-50%,-50%) scale(0,0)"; overlay.style.opcity = "0"; //根据动画时间 动画完成再移除 setTimeout(() => { //把弹窗的dom和遮罩移除 document.body.removeChild(el) document.body.removeChild(overlay); }, 300); }, //事件处理函数,为DOM绑定事件 _bind({ el, overlay }) { //保存当前this //const _this = this; const cancle = (e) => { this.cancle && this.cancle.call(this, e); //隐藏弹窗 //hideMsg(); this._close({ el, overlay }); } //确认弹窗 const confirm = (e) => { this.confirm && this.confirm.call(this, e); this._close({ el, overlay }); } //顶部关闭按钮绑定事件 if (this.header) { el.querySelector(".msg-header-close-button").addEventListener("click", cancle); } //弹窗底部两个按钮事件监听 if (this.footer) { el.querySelector(".msg-footer-cancel-button").addEventListener("click", cancle); el.querySelector(".msg-footer-confirm-button").addEventListener("click", confirm) } } } //将构造函数暴露到window 可直接在全局作用域中访问构造函数 window.$Msg = Msg;})(window, document); 到此,一个完整的自定义弹窗组件已完成,只需要引入该js以及css或者直接把相关代码加到自己的公共js中即可直接调用,注意,构造函数调用要用new. 转自https://www.cnblogs.com/websharehome/p/9438741.html

修改你的显卡和CPU为最新型号,让你的硬件与时俱进!

查看一台电脑的硬件配置,一般通过设备管理器,也可以通过dxdiag查看!决定电脑配置性能的最主要零件,应属CPU和显卡了,有没有办法让设备管理器中显示的CPU和显卡名字,修改为我自己想显示的呢?本软件就具有此功能,软件名一叶障目,就是自己骗自己的意思,硬件没变,只是名字变了,把750 Ti的显卡瞬间变成3060显卡,把I3的cpu瞬间显示为I7的cpu 下图演示了,配置好原显卡或cpu名称,再配置好需要显示的显卡或cpu名字,运行一下本软件,设备管理器和dxdiag中显示的硬件名字就修改成功了!本软件只需要运行一次就修改成功了(家用电脑),如果有还原,只需开机运行一次就修改成功!(网吧电脑)(暂时只持intel的cpu和n卡,AMD和A卡不能修改,没测试环境) 本软件就是你寻找的修改显卡型号软件,修改CPU型号软件,软件并未真正修改显卡信息,cpu信息,硬件没变,只是修改了显卡显示信息和CPU显示信息! 在win7和win10下测试正常,win11未测试 (有种网吧叫隔壁网吧全是3系列显卡,全是I7 I9 CPU) 下载地址

局域网文件多播,局域网拷贝文件,大文件批量传输

功能简介  HOU文件多播 是用于局域网文件“一对多”批量传输的软件。它是基于UDP的可靠传输,能有效提高传输速度,并减轻服务器负载。   多播(组播)的优点:可以真正同时的进行文件传送,客户机越多,总体速度就越快。因为 总体速度 = 传送速度 X 客户机数目 。特别适合大文件的批量传输! 使用功能说明选项:  1.“循环启动”,和“自动开始”配合使用可实现无人值守。  2.“自动开始”,根据设置的条件自动开始传输,如:当有3个接收端连接时 或 当有一个接收端连接且达到“最大等待”时间。  3.“传输速率”,这个对在高负载网络上传输时较实用,可限制传输的带宽占用,减轻网络负载。如果接收端性能较差可以适当限制传输速率,以提高整体速度。  4.“传输接口”,一般最好选择固定接口,特别是在发送端上存在ADSL拨号时需要选择接口,软件会自动添加组播路由,以正常传输。  5.“开启流模式”,强制以组播方式传输,就算只有一个接收端(正常情况下只有一个接收端时会使用点对点传输)。此功能开启后允许接收端加入一个正在传输的会话进行接收(但之前已经传输的数据将无法收到,所以一般不要中途加入)。 高级选项:  6.“初始片块数”,相当于TCP中的窗口大小,就是一次连续发送的块(UDP包)数。0为默认,一般不要修改。  7.“动态调整片块数”,根据重传情况自动调整连续发送的块数,以适应波动较大的网络(如无线)。  8.“超时重试次”,在发送完一片后请求接收端确认时,重试次数,以确定是否要放弃无响应的接收端。如果经常出现接收端被断开,可适当加大重试次数。 文件说明:  “DMCSender.exe” 发送端   “DMCReceiver.exe” 接收端  使用:    开始 -> 运行 -> DMCReceiver.exe D:\ 图文使用说明

系统无法启动-电脑蓝屏等怎么办?使用Win10系统内置的万能工具解决此类问题!

Windows无法正常工作,一般情况下很多人的做法就是重装系统,但对于电脑小白来说,重装系统就像是一个难题。并且系统中的数据最为重要,重装不是最好的选择。如果系统出现了问题,大家可利用该工具修复系统问题,实在没辙了再重装也为时未晚! 由于磁盘损坏、系统文件损坏或缺少 或安装更新时挂起的操作,系统可能无法启动,依次执行 BCDEdit (查看系统盘符) CHKDSK /f 系统盘符: (修复磁盘错误) SFC /scannow /offbootdir=系统盘符:\ /offwindir=系统盘符:\windows (检查修复系统文件) 这是微软官方给出的解决windows常见启动问题的方法!蓝屏或启动不了系统,可以试试这样操作,不能保证百分百成功,至少离恢复正常工作环境又近了一步!注册表造成的蓝屏可以使用上个蓝屏视频试试! 执行sfc的相关提供信息如下: 欢迎关注百脑问抖音:杰叔说电脑 抖音号:jscomp 欢迎关注百脑问抖音:表情包零动画 抖音号:bqbao

解决在hexo上github推送连接失败的问题

在国内,有时候使用 git clone 的速度实在太慢而让人难以承受,或者 git pull/git push 一点反应都没有,这里整理了一下解决方法,亲测有效。总的来说,这是因为 github.global.ssl.fastly.net 域名被限制了。只要找到这个域名对应的 ip 地址,然后在 hosts 文件中加上 ip–>域名 的映射,刷新 DNS 缓存便可。1.查找域名对应的 ip 地址 在网站 https://www.ipaddress.com/ 分别搜索 github.global.ssl.fastly.net 和 github.com 或者在本地的终端中如下键入: 123456789101112131415$ nslookup github.global.ssl.fastly.NetServer: 127.0.0.53Address: 127.0.0.53#53Non-authoritative answer:Name: github.global.ssl.fastly.NetAddress: 151.101.229.194$ nslookup github.comServer: 127.0.0.53Address: 127.0.0.53#53Non-authoritative answer:Name: github.comAddress: 13.229.188.59 修改 hosts 文件 Windows 上的 hosts 文件路径在: C:\Windows\System32\drivers\etc\hosts在 hosts 文件末尾添加两行1234567891011121314151617181920212223# Copyright (c) 1993-2009 Microsoft Corp.## This is a sample HOSTS file used by Microsoft TCP/IP for Windows.## This file contains the mappings of IP addresses to host names. Each# entry should be kept on an individual line. The IP address should# be placed in the first column followed by the corresponding host name.# The IP address and the host name should be separated by at least one# space.## Additionally, comments (such as these) may be inserted on individual# lines or following the machine name denoted by a '#' symbol.## For example:## 102.54.94.97 rhino.acme.com # source server# 38.25.63.10 x.acme.com # x client host# localhost name resolution is handled within DNS itself.# 127.0.0.1 localhost# ::1 localhost199.232.69.194 github.global.ssl.fastly.net Linux 的 hosts 文件路径在 /etc/hosts 中:1$ sudo vim /etc/hosts 刷新 DNS 缓存 windows1ipconfig /flushdns linux1$ sudo /etc/init.d/networking restart 参考文献解决linux上git clone速度慢的问题git clone速度太慢的解决办法 本文转载自解决 GitHub 的 host 域名被限制的问题

看完世界上最诡异的图片,你还会相信你的眼睛吗?

如果你看见这个舞女是顺时针转,说明你用的是右脑;­如果是逆时针转,说明你用的左脑。­据说,14%的美国人可以两个方向都能看见。­可以和别人一起看,测试下,一般不同人同时看这张图的感觉都会不太一样的,真的很神奇。照片的本身由34张图片组成的gif图,在photoshop中,一张一张的看,是从左向右转动,如果你看到的图片一会左转,一会儿右转,并不是图片本身是多方向变动的,这一点你可以下载图片自己用photoshop查看! 下面这张图片:柱子到底是圆的还是方的,别着急慢慢看 看着黑点身体前后移动 这些图片到底是静的还是动的(看则静,不看则动)

编程实现关闭显示器等的python源代码-等同于按显示器的电源键

可实现功能通过显示器的 DDC/CI 来直接操作显示器,拯救可怜的显示器按键。 支持的操作: 调整亮度 调整对比度 设置色温 / 颜色预设 设置RGB颜色的比例 OSD语言 开关机 切换输入源 自动调整图像 (VGA输入需要) 恢复出厂设置 系统需求Windows Vista +Python3 (建议安装时选上Python Launcher)支持DDC/CI的外接显示器,不支持笔记本内置显示器 使用参考GUI 模式不附加参数启动 monitor_ctrl.py 即可启动GUI,直接拖动滑条设置显示器的参数。 由于显示器应用VCP指令可能需要一定时间,为避免出错,GUI模式将忽略命令行指定的操作。 GUI中显示的配置不会自动刷新,要查看新的配置目前需要重启应用程序。 将文件后缀修改为 .pyw, 直接双击打开,可以避免显示conhost黑窗口 命令行模式当指定 -c 选项或者 tkinter import失败就会使用CLI模式。 py monitor_ctrl.py [-h] [-m Model_string] [-s Settings_string] [-r] [-t] [-c] [-l] [-v] -h 显示帮助 -m 指定要应用到的Monitor Model,不指定则应用到所有可操作的显示器 -s property1=value1:property2=”value 2” 应用多项设置 -r 将显示器恢复出厂设置 -t 对输入执行自动调整(仅VGA输入需要) -c 不启用GUI -l 显示可操作的显示器model -v Verbose logging