Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Commit dc27292

Browse files
committed
Fix youtube download issue
1 parent 3e3762b commit dc27292

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

chrome-extension/background.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ if (!localStorage["uget-interrupt"]) {
6161
var interrupt = (localStorage["uget-interrupt"] == "true");
6262
setInterruptDownload(interrupt);
6363
}
64-
console.log(localStorage["uget-interrupt"]);
6564
// Message format to send the download information to the uget-chrome-wrapper
6665
var message = {
6766
url: '',

uget-chrome-wrapper/bin/uget-chrome-wrapper

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ def extract_file_name(url):
4545
fileName = ''
4646
if 'googlevideo.com/' in url and '&title=' in url:
4747
# Youtube video
48-
url = urllib.unquote(url)
48+
logger.debug('Found Youtube video')
49+
url = urllib.parse.unquote(url)
4950
url_components = url.split('&')
5051
for smt in url_components:
5152
if smt.startswith('title='):
@@ -57,6 +58,7 @@ def extract_file_name(url):
5758
fileName = title
5859
if mime:
5960
fileName += guess_extension(mime)
61+
logger.debug('Youtube filename: ' + fileName)
6062
else:
6163
fileName = basename(urlparse(url).path).replace('%20', ' ')
6264

@@ -123,4 +125,4 @@ def Main():
123125

124126

125127
if __name__ == '__main__':
126-
Main()
128+
Main()

0 commit comments

Comments
 (0)