Skip to content

Commit aed8d7d

Browse files
author
Mickey
committed
Merge branch 'hotfix/0.0.5'
Merge
2 parents e6fb312 + 798254a commit aed8d7d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ test.php
77
pornhub.html
88
Runtime
99
Videos
10-
JS
10+
JS
11+
config.php

core/Platform/Qq/Qq.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function getVid():?string
5555
//https://v.qq.com/x/cover/m441e3rjq9kwpsc/h00251u5sdp.html?
5656
$baseName = pathinfo($this->requestUrl, PATHINFO_BASENAME);
5757
if(!$baseName){
58-
throw new \ErrorException('无法匹配 vid');
58+
$this->error('Error:无法匹配 vid');
5959
}
6060

6161
$vid = substr($baseName, 0, 11);
@@ -112,7 +112,7 @@ public function getKey($format,string $fileName):array
112112
return $keyInfo[0];
113113
}
114114

115-
throw new \ErrorException('无法获取 key');
115+
$this->error('Error:无法获取 key');
116116
}
117117

118118
/**
@@ -151,6 +151,10 @@ public function download():void
151151

152152
$videosTitle = $videosListInfo['vl']['vi'][0]['ti'];
153153

154+
if(empty($videosTitle)){
155+
$videosTitle = md5($this->requestUrl);
156+
}
157+
154158
$this->setVideosTitle($videosTitle);
155159

156160
$videoFi = ArrayHelper::multisort($videosListInfo['fl']['fi'], 'br', SORT_DESC);

0 commit comments

Comments
 (0)