PSY - GANGNAM STYLE(강남스타일) M/V
13336198 1894606 2951952744
PSY - DADDY(feat. CL of 2NE1) M/V @ https://youtu.be/FrG4TEcSuRg
PSY - 나팔바지(NAPAL BAJI) M/V @ https://youtu.be/tF27TNC_4pc
PSY - 7TH ALBUM '칠집싸이다' on iTunes @ http://smarturl.it/PSY_7THALBUM
PSY - GANGNAM STYLE(강남스타일) on iTunes @ http://smarturl.it/PsyGangnam
#PSY #싸이 #GANGNAMSTYLE #강남스타일
More about PSY@
http://www.psypark.com/
http://www.youtube.com/officialpsy
http://www.facebook.com/officialpsy
http://twitter.com/psy_oppa
https://www.instagram.com/42psy42
http://iTunes.com/PSY
http://sptfy.com/PSY
http://weibo.com/psyoppa
http://twitter.com/ygent_official
By anonymous 2017-09-20
Here's an updated (June, 2017) version that works directly from the dev tools console available in any browser. Currently should work for any Youtube media type, including up to 4k if its available.
https://gist.github.com/geuis/8b1b2ea57d7f9a9ae22f80d4fbf5b97f
// ES6 version
const videoUrls = ytplayer.config.args.adaptive_fmts
.split(',')
.map(item => item
.split('&')
.reduce((prev, curr) => (curr = curr.split('='),
Object.assign(prev, {[curr[0]]: decodeURIComponent(curr[1])})
), {})
)
.reduce((prev, curr) => Object.assign(prev, {
[curr.quality_label || curr.type]: curr
}), {});
console.log(videoUrls);
// ES5 version
var videoUrls = ytplayer.config.args.adaptive_fmts
.split(',')
.map(function (item) {
return item
.split('&')
.reduce(function (prev, curr) {
curr = curr.split('=');
return Object.assign(prev, {[curr[0]]: decodeURIComponent(curr[1])})
}, {});
})
.reduce(function (prev, curr) {
return Object.assign(prev, {
[curr.quality_label || curr.type]: curr
});
}, {});
console.log(videoUrls);
Sample output for https://www.youtube.com/watch?v=9bZkp7q19f0
{
"1080p": {
"itag": "248",
"xtags": "",
"lmt": "1440215955569849",
"url": "https://r16---sn-n4v7kn7r.c.youtube.com/videoplayback?itag=248&keepalive=ye…2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csc%2Csource%2Cexpire&mt=1498245944",
"type": "video/webm;+codecs=\"vp9\"",
"bitrate": "1733724",
"index": "243-1977",
"size": "1920x1080",
"projection_type": "1",
"fps": "30",
"clen": "31192903",
"init": "0-242",
"quality_label": "1080p"
},
"720p": {
"itag": "247",
"xtags": "",
"lmt": "1440215905109639",
"url": "https://r16---sn-n4v7kn7r.c.youtube.com/videoplayback?itag=247&keepalive=ye…2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csc%2Csource%2Cexpire&mt=1498245944",
"type": "video/webm;+codecs=\"vp9\"",
"bitrate": "726076",
"index": "243-1933",
"size": "1280x720",
"projection_type": "1",
"fps": "30",
"clen": "15801933",
"init": "0-242",
"quality_label": "720p"
},
"480p": {
"itag": "244",
"xtags": "",
"lmt": "1440215890236689",
"url": "https://r16---sn-n4v7kn7r.c.youtube.com/videoplayback?itag=244&keepalive=ye…2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csc%2Csource%2Cexpire&mt=1498245944",
"type": "video/webm;+codecs=\"vp9\"",
"bitrate": "396541",
"index": "243-1933",
"size": "854x480",
"projection_type": "1",
"fps": "30",
"clen": "7928237",
"init": "0-242",
"quality_label": "480p"
},
"360p": {
"itag": "243",
"xtags": "",
"lmt": "1440215888783441",
"url": "https://r16---sn-n4v7kn7r.c.youtube.com/videoplayback?itag=243&keepalive=ye…2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csc%2Csource%2Cexpire&mt=1498245944",
"type": "video/webm;+codecs=\"vp9\"",
"bitrate": "223695",
"index": "243-1933",
"size": "640x360",
"projection_type": "1",
"fps": "30",
"clen": "5127362",
"init": "0-242",
"quality_label": "360p"
},
"240p": {
"itag": "242",
"xtags": "",
"lmt": "1440215900971640",
"url": "https://r16---sn-n4v7kn7r.c.youtube.com/videoplayback?itag=242&keepalive=ye…2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csc%2Csource%2Cexpire&mt=1498245944",
"type": "video/webm;+codecs=\"vp9\"",
"bitrate": "113952",
"index": "242-1931",
"size": "426x240",
"projection_type": "1",
"fps": "30",
"clen": "2597162",
"init": "0-241",
"quality_label": "240p"
},
"144p": {
"itag": "278",
"xtags": "",
"lmt": "1440215900119192",
"url": "https://r16---sn-n4v7kn7r.c.youtube.com/videoplayback?itag=278&keepalive=ye…2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csc%2Csource%2Cexpire&mt=1498245944",
"type": "video/webm;+codecs=\"vp9\"",
"bitrate": "60303",
"index": "242-1930",
"size": "256x144",
"projection_type": "1",
"fps": "15",
"clen": "1798744",
"init": "0-241",
"quality_label": "144p"
},
"audio/mp4;+codecs=\"mp4a.40.2\"": {
"bitrate": "128266",
"itag": "140",
"xtags": "",
"lmt": "1440578358539132",
"index": "592-1271",
"clen": "8482615",
"projection_type": "1",
"url": "https://r16---sn-n4v7kn7r.c.youtube.com/videoplayback?itag=140&keepalive=ye…2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csc%2Csource%2Cexpire&mt=1498245944",
"type": "audio/mp4;+codecs=\"mp4a.40.2\"",
"init": "0-591"
},
"audio/webm;+codecs=\"vorbis\"": {
"bitrate": "118499",
"itag": "171",
"xtags": "",
"lmt": "1440215938192462",
"index": "4452-5366",
"clen": "6383456",
"projection_type": "1",
"url": "https://r16---sn-n4v7kn7r.c.youtube.com/videoplayback?itag=171&keepalive=ye…2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csc%2Csource%2Cexpire&mt=1498245944",
"type": "audio/webm;+codecs=\"vorbis\"",
"init": "0-4451"
},
"audio/webm;+codecs=\"opus\"": {
"bitrate": "154966",
"itag": "251",
"xtags": "",
"lmt": "1440215889283443",
"index": "272-1186",
"clen": "9526605",
"projection_type": "1",
"url": "https://r16---sn-n4v7kn7r.c.youtube.com/videoplayback?itag=251&keepalive=ye…2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csc%2Csource%2Cexpire&mt=1498245944",
"type": "audio/webm;+codecs=\"opus\"",
"init": "0-271"
}
}
By anonymous 2017-09-20
When you look into error messages, you will notice
PHP Warning: syntax error, unexpected '=' in links.ini on line 1\n in /var/www/example.com/index.php on line 2
and when looking at links.ini
, you will see a second equal sign =
in the URL
youtube1 = https://www.youtube.com/watch?v=9bZkp7q19f0
So quoting the value, e.g.
youtube1 = "https://www.youtube.com/watch?v=9bZkp7q19f0"
should make it work as expected.
By anonymous 2017-10-08
I want to run a href using jquery. This is the link I would like to run:
<a class="venobox" data-vbtype="video" href="https://www.youtube.com/watch?v=9bZkp7q19f0">
What I would like to do is to call that link through jquery, either on load or on setInterval. How would I implement calling that href but ensuring the class is called too?
Thanks
By anonymous 2017-10-15
I am trying to use util.promisify function, but my code doesn't work. I think I don't understand how promises/promisify work. If I use new Promise
my code works, but if I use promisify
it doesn't.
if I run this code:
const oembed = require('oembed-auto');
const { promisify } = require('util');
const test = () => {
return new Promise((resolve, reject) => {
oembed("http://www.youtube.com/watch?v=9bZkp7q19f0", function (err, data) {
resolve(data);
});
});
};
module.exports.getAllInterests = async () => {
const data = await test();
console.log(data);
return data;
};
I got expected result:
{ html: '<iframe width="480" height="270" src="https://www.youtube.com/embed/9bZkp7q19f0?feature=oembed" frameborder="0" allowfullscreen></iframe>',
author_url: 'https://www.youtube.com/user/officialpsy',
thumbnail_url: 'https://i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg',
width: 480,
height: 270,
author_name: 'officialpsy',
thumbnail_height: 360,
title: 'PSY - GANGNAM STYLE(강남스타일) M/V',
version: '1.0',
provider_url: 'https://www.youtube.com/',
thumbnail_width: 480,
type: 'video',
provider_name: 'YouTube' }
If I run this code:
const oembed = require('oembed-auto');
const { promisify } = require('util');
const test = () => {
promisify(oembed)("http://www.youtube.com/watch?v=9bZkp7q19f0").then((data) => {
resolve(data);
});
};
module.exports.getAllInterests = async () => {
const data = await test();
console.log(data);
return data;
};
Async/await doesn't work and I get:
undefined
(node:66423) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: resolve is not defined
(node:66423) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
By anonymous 2017-10-15
No value is return
ed from test
, resolve
is undefined
within .then()
const test = () => promisify(oembed)("http://www.youtube.com/watch?v=9bZkp7q19f0");
module.exports.getAllInterests = async () => {
let data;
try {
data = await test();
console.log(data);
} catch (err) {
console.error(err);
throw err;
}
return data;
};
getAllInterests().then(res => console.log(res), err => console.err(err));
By anonymous 2017-11-27
So I tried to click a button on YouTube, but I can't find the button by the Xpath because there are so many buttons, so I tried saving them in an IList, now I want to click a specific button in the list.
ChromeDriver chrome = new ChromeDriver();
List<IWebElement> textfields = new List<IWebElement>();
chrome.Navigate().GoToUrl("https://www.youtube.com/watch?v=9bZkp7q19f0");
textfields = chrome.FindElements(By.XPath("//*[@id=\"button"]")).ToList();
By anonymous 2017-11-27
As per the documentation of Selenium
FindElements(By.XPath("//*[@id=\"button"]"))
will return a List
of type ReadOnlyCollection<IWebElement>
. So you can simplify your code like :
ChromeDriver chrome = new ChromeDriver();
List<IWebElement> textfields = new List<IWebElement>();
chrome.Navigate().GoToUrl("https://www.youtube.com/watch?v=9bZkp7q19f0");
textfields = chrome.FindElements(By.XPath("//*[@id='button']"));
foreach (IWebElement field in textfields)
{
string my_text = field.GetAttribute("any_attribute_button_tag");
Console.WriteLine(my_text);
}
By anonymous 2017-12-04
i can't download using pytube,
script
from pytube import YouTube
YouTube('http://youtube.com/watch?v=9bZkp7q19f0').streams.first().download()
output
Traceback (most recent call last):
File "<pyshell#16>", line 1, in <module>
YouTube('http://youtube.com/watch?v=9bZkp7q19f0').streams.first().download()
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\site-packages\pytube\streams.py", line 191, in download
bytes_remaining = self.filesize
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\site-packages\pytube\streams.py", line 161, in filesize
headers = request.get(self.url, headers=True)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\site-packages\pytube\request.py", line 21, in get
response = urlopen(url)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 162, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 465, in open
response = self._open(req, data)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 483, in _open
'_open', req)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 443, in _call_chain
result = func(*args)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 1283, in https_open
context=self._context, check_hostname=self._check_hostname)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 1243, in do_open
r = h.getresponse()
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\http\client.py", line 1174, in getresponse
response.begin()
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\http\client.py", line 282, in begin
version, status, reason = self._read_status()
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\http\client.py", line 243, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\socket.py", line 571, in readinto
return self._sock.recv_into(b)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\ssl.py", line 924, in recv_into
return self.read(nbytes, buffer)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\ssl.py", line 786, in read
return self._sslobj.read(len, buffer)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\ssl.py", line 570, in read
v = self._sslobj.read(len, buffer)
TimeoutError: [WinError 10060] Une tentative de connexion a échoué car le parti connecté n’a pas répondu convenablement au-delà d’une certaine durée ou une connexion établie a échoué car l’hôte de connexion n’a pas répondu
>>> YouTube('http://youtube.com/watch?v=9bZkp7q19f0').streams.first()
<Stream: itag="22" mime_type="video/mp4" res="720p" fps="30fps" vcodec="avc1.64001F" acodec="mp4a.40.2">
>>> YouTube('http://youtube.com/watch?v=9bZkp7q19f0').streams.first().download()
Traceback (most recent call last):
File "<pyshell#18>", line 1, in <module>
YouTube('http://youtube.com/watch?v=9bZkp7q19f0').streams.first().download()
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\site-packages\pytube\streams.py", line 194, in download
self.filesize, fp,
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\site-packages\pytube\streams.py", line 161, in filesize
headers = request.get(self.url, headers=True)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\site-packages\pytube\request.py", line 21, in get
response = urlopen(url)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 162, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 471, in open
response = meth(req, response)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 581, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 503, in error
result = self._call_chain(*args)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 443, in _call_chain
result = func(*args)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 686, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 465, in open
response = self._open(req, data)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 483, in _open
'_open', req)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 443, in _call_chain
result = func(*args)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 1283, in https_open
context=self._context, check_hostname=self._check_hostname)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 1243, in do_open
r = h.getresponse()
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\http\client.py", line 1174, in getresponse
response.begin()
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\http\client.py", line 282, in begin
version, status, reason = self._read_status()
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\http\client.py", line 243, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\socket.py", line 571, in readinto
return self._sock.recv_into(b)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\ssl.py", line 924, in recv_into
return self.read(nbytes, buffer)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\ssl.py", line 786, in read
return self._sslobj.read(len, buffer)
File "C:\Users\toto\AppData\Local\Programs\Python\Python35\lib\ssl.py", line 570, in read
v = self._sslobj.read(len, buffer)
TimeoutError: [WinError 10060]
By anonymous 2017-12-11
I'm trying to download youtube videos with pytube
this way:
from pytube import YouTube
YouTube('http://youtube.com/watch?v=9bZkp7q19f0').streams.first().download()
but the file will have the same name as the original video name. How do I specify a custom filename?
By anonymous 2017-12-11
This is not possible in the current latest (v7.0.18) release. The feature has been added, but no new release has been released since then. If you want to have this feature, you need to download the pytube repository: https://github.com/NFicano/pytube
If you have done so, you can use YouTube('http://youtube.com/watch?v=9bZkp7q19f0').streams.first().download(filename='filename')
It will automatically add the filename extension, so you don't have to include that.
I found it by reading the source. There, I found the declaration of the function download
in the file streams.py
:
def download(self, output_path=None, filename=None):
So you can obviously also specify a path.
For a good workaround, see landogardner's answer.
By anonymous 2017-12-11
To add to klutt's answer, it doesn't look like there's been a new pypi release since this feature was added, so for now you can either download the code directly as klutt suggests, or, as a workaround, manually rename the file after the download()
call, e.g.:
import os
from pytube import YouTube
yt = YouTube('http://youtube.com/watch?v=9bZkp7q19f0')
yt.streams.first().download()
os.rename(yt.streams.first().default_filename, 'new_filename.ext')`
By anonymous 2018-02-26
I tried to extract element and assign it to variable from array but it gave me this error:
Traceback (most recent call last):
File "test.py", line 12, in <module>
itag_start = element.find(itag)
AttributeError: 'Stream' object has no attribute 'find'
This is my code
from pytube import YouTube
link = YouTube('http://youtube.com/watch?v=9bZkp7q19f0')
array = link.streams.all()
itag = 'itag'
mime_type='mime_type'
res='res'
counter = 0
iv = []
mt = []
re = []
for element in array :
itag_start = element.find(itag)
if itag_start != -1:
itag_end = element.find('"', itag_start+len(itag)+2)
itag_value = element[itag_start+len(itag)+1:itag_end+1]
iv.insert(counter,itag_value)
mime_type_start = element.find(mime_type)
if mime_type_start != -1:
mime_type_end = element.find('"', mime_type_start+len(mime_type)+2)
mime_type_value = element[mime_type_start+len(mime_type)+1:mime_type_end+1]
mt.insert(counter,mime_type_value)
res_start = element.find(res)
if res_start != -1:
res_end = element.find('"', res_start+len(res)+2)
res_value = element[res_start+len(res)+1:res_end+1]
re.insert(counter,res_value)
counter = counter + 1
However if I replace link.streams.all() directly with the output, the error will gone.
[<Stream: itag="22" mime_type="video/mp4" res="720p" fps="30fps" vcodec="avc1.64001F" acodec="mp4a.40.2">,
<Stream: itag="43" mime_type="video/webm" res="360p" fps="30fps" vcodec="vp8.0" acodec="vorbis">,
<Stream: itag="18" mime_type="video/mp4" res="360p" fps="30fps" vcodec="avc1.42001E" acodec="mp4a.40.2">,
<Stream: itag="36" mime_type="video/3gpp" res="240p" fps="30fps" vcodec="mp4v.20.3" acodec="mp4a.40.2">,
<Stream: itag="17" mime_type="video/3gpp" res="144p" fps="30fps" vcodec="mp4v.20.3" acodec="mp4a.40.2">,
<Stream: itag="137" mime_type="video/mp4" res="1080p" fps="30fps" vcodec="avc1.640028">,
<Stream: itag="248" mime_type="video/webm" res="1080p" fps="30fps" vcodec="vp9">,
<Stream: itag="136" mime_type="video/mp4" res="720p" fps="30fps" vcodec="avc1.4d401f">,
<Stream: itag="247" mime_type="video/webm" res="720p" fps="30fps" vcodec="vp9">,
<Stream: itag="135" mime_type="video/mp4" res="480p" fps="30fps" vcodec="avc1.4d401e">,
<Stream: itag="244" mime_type="video/webm" res="480p" fps="30fps" vcodec="vp9">,
<Stream: itag="134" mime_type="video/mp4" res="360p" fps="30fps" vcodec="avc1.4d401e">,
<Stream: itag="243" mime_type="video/webm" res="360p" fps="30fps" vcodec="vp9">,
<Stream: itag="133" mime_type="video/mp4" res="240p" fps="30fps" vcodec="avc1.4d4015">,
<Stream: itag="242" mime_type="video/webm" res="240p" fps="30fps" vcodec="vp9">,
<Stream: itag="160" mime_type="video/mp4" res="144p" fps="30fps" vcodec="avc1.4d400c">,
<Stream: itag="278" mime_type="video/webm" res="144p" fps="30fps" vcodec="vp9">,
<Stream: itag="140" mime_type="audio/mp4" abr="128kbps" acodec="mp4a.40.2">,
<Stream: itag="171" mime_type="audio/webm" abr="128kbps" acodec="vorbis">,
<Stream: itag="249" mime_type="audio/webm" abr="50kbps" acodec="opus">,
<Stream: itag="250" mime_type="audio/webm" abr="70kbps" acodec="opus">,
<Stream: itag="251" mime_type="audio/webm" abr="160kbps" acodec="opus">]
Any idea on how to fix this?
Submit Your Video
By dredmorbius 2017-09-20
I also prefer seeing how my information ages:
http://www.modernlibrary.com/top-100/100-best-novels/
http://www.modernlibrary.com/top-100/100-best-nonfiction/
I'm more inclined to the Board's list than the (self-selecting, possibly motivated) Readers'.
WEF have a list of the 20 most influenctial books:
https://www.weforum.org/agenda/2015/11/the-20-most-influenti...
Wikipedia has an (IMO) fascinating list of the most-sold books of all time. The Bible and Quotations from Chairman Mao (a/k/a "The Little Red Book") each have claims of over 1 billion volumes (1-6 being the range) sold. The next highest-selling book, Don Quixote, at 500m copies.
Contrast that with the most-viewed YouTube video of all time -- Gangnam Style has amassed 2.8 billion views in five years. That's still the YouTube record so far as I'm aware.
That makes me wonder what the highest number of impressions of any one media work has been.
https://en.m.wikipedia.org/wiki/List_of_best-selling_books
https://m.youtube.com/watch?v=9bZkp7q19f0
Original Thread