Skip to content

Commit

Permalink
fixed version bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
HeiSir committed Jun 22, 2020
1 parent 911f246 commit 1f920c2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/style.css">
</head>
<body class="heisir">
<div class="header"><span class="title">M3U8-Downloader v1.0.7</span>
<div class="header"><span class="title">M3U8-Downloader v1.0.8</span>
<div class="space"></div>
<a class="home" href="https://tools.heisir.cn/HLSDownload/" target="_blank">官网</a>
<a class="qqgroup" href="https://jq.qq.com/?_wv=1027&k=nhFrZBS0">点击加群</a>
Expand Down
2 changes: 2 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ app.on('ready', function () {
fs.writeFileSync('tongji.ini', HMACCOUNT, { encoding: "utf-8", flag: "w" });
}
catch (error_) {
console.log(error_);
}
console.log(HMACCOUNT);
return [4 /*yield*/, got("http://hm.baidu.com/hm.gif?hca=" + HMACCOUNT + "&cc=1&ck=1&cl=24-bit&ds=1920x1080&vl=977&ep=6621%2C1598&et=3&ja=0&ln=zh-cn&lo=0&lt=" + (new Date().getTime() / 1000) + "&rnd=0&si=300991eff395036b1ba22ae155143ff3&v=1.2.74&lv=3&sn=0&r=0&ww=1920&u=https%3A%2F%2Ftools.heisir.cn%2FM3U8Soft-Client%2F", { headers: { "Referer": "https://tools.heisir.cn/M3U8Soft-Client/", "Cookie": "HMACCOUNT=" + HMACCOUNT } })];
Expand All @@ -213,6 +214,7 @@ app.on('ready', function () {
return [3 /*break*/, 5];
case 4:
error_1 = _a.sent();
console.log(error_1);
return [3 /*break*/, 5];
case 5: return [2 /*return*/];
}
Expand Down
6 changes: 3 additions & 3 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ app.on('ready', () => {
checkUpdate();

setInterval(checkUpdate,600000);

let HMACCOUNT = '';
if(fs.existsSync('tongji.ini'))
{
Expand All @@ -161,13 +161,13 @@ app.on('ready', () => {
HMACCOUNT = headers['set-cookie'][0].match(/HMACCOUNT=(.*?);/i)[1];
fs.writeFileSync('tongji.ini',HMACCOUNT,{encoding:"utf-8",flag:"w"})
} catch (error_) {

console.log(error_)
}
console.log(HMACCOUNT);
await got(`http://hm.baidu.com/hm.gif?hca=${HMACCOUNT}&cc=1&ck=1&cl=24-bit&ds=1920x1080&vl=977&ep=6621%2C1598&et=3&ja=0&ln=zh-cn&lo=0&lt=${(new Date().getTime()/1000)}&rnd=0&si=300991eff395036b1ba22ae155143ff3&v=1.2.74&lv=3&sn=0&r=0&ww=1920&u=https%3A%2F%2Ftools.heisir.cn%2FM3U8Soft-Client%2F`,{headers:{"Referer": "https://tools.heisir.cn/M3U8Soft-Client/","Cookie":"HMACCOUNT="+HMACCOUNT}});
await got(`http://hm.baidu.com/hm.gif?cc=1&ck=1&cl=24-bit&ds=1920x1080&vl=977&et=0&ja=0&ln=zh-cn&lo=0&rnd=0&si=300991eff395036b1ba22ae155143ff3&v=1.2.74&lv=1&sn=0&r=0&ww=1920&ct=!!&tt=M3U8Soft-Client`,{headers:{"Referer": "https://tools.heisir.cn/M3U8Soft-Client/","Cookie":"HMACCOUNT="+HMACCOUNT}});
} catch (error) {

console.log(error)
}

})();
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "m3u8-downloader",
"version": "1.0.7",
"version": "1.0.8",

"description": "hls 下载器,用于下载主流网站的视频和直播。",
"main": "main.js",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion render.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ aqqgroup.onclick = ahome.onclick = function(e){
shell.openExternal(href);
}

var input_url = document.querySelector('.heisir .main .addTask input[type=text]');
var input_url = document.querySelector('.heisir .main .addTask .urls');
var btnAddTask = document.querySelector('.heisir .main .addTask .download');
var btnHeaders = document.querySelector('.heisir .main .addTask .httpHeader');
var info = document.querySelector('.heisir .main .addTask .info');
Expand Down

0 comments on commit 1f920c2

Please sign in to comment.