mirror of
https://github.com/develop202/migu_video.git
synced 2025-12-17 07:18:22 +08:00
判断location非空
This commit is contained in:
6
app.js
6
app.js
@@ -196,6 +196,10 @@ const server = http.createServer(async (req, res) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const location = obj.headers.get("Location")
|
const location = obj.headers.get("Location")
|
||||||
|
|
||||||
|
if (location == "" || location == undefined || location == null) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if (location.startsWith("http://hlsz")) {
|
if (location.startsWith("http://hlsz")) {
|
||||||
resObj.url = location
|
resObj.url = location
|
||||||
break
|
break
|
||||||
@@ -279,7 +283,7 @@ server.listen(port, async () => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
await update(hours)
|
// await update(hours)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
printRed("更新失败")
|
printRed("更新失败")
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ async function fetchURLByAndroid720p() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const location = obj.headers.get("Location")
|
const location = obj.headers.get("Location")
|
||||||
|
|
||||||
|
|
||||||
|
if (location == "" || location == undefined || location == null) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if (location.startsWith("http://hlsz")) {
|
if (location.startsWith("http://hlsz")) {
|
||||||
resObj.url = location
|
resObj.url = location
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user