Konsep donwload video youtube
1. Buka video yang ingin di download. misal : http://youtube.com/watch?v=BjPv_xm_dHQ
2. Videonya nggak perlu dimainkan/dijalankan. (saya pake addon flashblock-nya firefox)
3. Lihat source dari halaman tersebut. Perhatikan bagian ini
var swfArgs = {"BASE_YT_URL": "http://youtube.com/", "sourceid": "y", "video_id": "BjPv_xm_dHQ", "sw": "0.05", "l": 216, "sk": "z-guOET58AxmKs6DnUu_6QU", "t": "OEgsToPDskJ82XRxutQqL-fcWSNGDOD8", "hl": "en", "plid": "AARFaxqbX-xKdtJ5AAAAooA8CgA", "sdetail": "p%3A/"};
yang kita butuhkan hanya variable video_id dan t. disini kita lihat
video_id = BjPv_xm_dHQ
t = OEgsToPDskJ82XRxutQqL-fcWSNGDOD8
4. Kita tinggal ubah url nya menjadi
http://youtube.com/get_video?video_id=BjPv_xm_dHQ&t=OEgsToPDskJ82XRxutQqL-fcWSNGDOD8
5. Sampai disini kita sudah bisa mendownload file nya
Jika ingin menggunakan php untuk mencari tau detail file tersebut silakan buat file seperti ini :
misal kita save dengan nama dlyoutube.php dan kita akses di http://localhost/dlyoutube.php
Hasilnya sbb :
Besar file => [32] => Content-Length: 8830038
That's all. Ternyata lebih simple yg ini daripada yang dibatam.com. gpp lah... dah terlanjur :)
2. Videonya nggak perlu dimainkan/dijalankan. (saya pake addon flashblock-nya firefox)
3. Lihat source dari halaman tersebut. Perhatikan bagian ini
var swfArgs = {"BASE_YT_URL": "http://youtube.com/", "sourceid": "y", "video_id": "BjPv_xm_dHQ", "sw": "0.05", "l": 216, "sk": "z-guOET58AxmKs6DnUu_6QU", "t": "OEgsToPDskJ82XRxutQqL-fcWSNGDOD8", "hl": "en", "plid": "AARFaxqbX-xKdtJ5AAAAooA8CgA", "sdetail": "p%3A/"};
yang kita butuhkan hanya variable video_id dan t. disini kita lihat
video_id = BjPv_xm_dHQ
t = OEgsToPDskJ82XRxutQqL-fcWSNGDOD8
4. Kita tinggal ubah url nya menjadi
http://youtube.com/get_video?video_id=BjPv_xm_dHQ&t=OEgsToPDskJ82XRxutQqL-fcWSNGDOD8
5. Sampai disini kita sudah bisa mendownload file nya
Jika ingin menggunakan php untuk mencari tau detail file tersebut silakan buat file seperti ini :
<? $a=get_headers("http://youtube.com/get_video?video_id=BjPv_xm_dHQ&t=OEgsToPDskJ82XRxutQqL-fcWSNGDOD8"); print_r ($a); ?>
misal kita save dengan nama dlyoutube.php dan kita akses di http://localhost/dlyoutube.php
Hasilnya sbb :
Array ( [0] => HTTP/1.0 303 See Other [1] => Date: Tue, 05 Feb 2008 15:55:47 GMT [2] => Server: Apache [3] => Set-Cookie: use_hitbox=72c46ff6cbcdb7c5585c36411b6b334edAEAAAAw; path=/; domain=.youtube.com [4] => Set-Cookie: VISITOR_INFO1_LIVE=SRkwoA3lWNk; path=/; domain=.youtube.com; expires=Fri, 02-Feb-2018 15:55:47 GMT [5] => Set-Cookie: GEO=e76711554c1809eb35ec7aa5ffa66a5ecxQAAABJRCxqYixiYW5kdW5nLCwsLCwtMQ==; path=/; domain=.youtube.com; expires=Thu, 07-Feb-2008 15:55:47 GMT [6] => Set-Cookie: LOCALE_PREFERENCE=86d1d09eefe6b79b4068000ce05518a4dAUAAABlbl9VUw==; path=/; domain=.youtube.com; expires=Fri, 02-Feb-2018 15:55:47 GMT [7] => Cache-Control: no-cache [8] => Location: http://cache.googlevideo.com/get_video?video_id=BjPv_xm_dHQ&origin=dal-v131.dal.youtube.com [9] => Content-Type: text/html; charset=utf-8 [10] => X-Cache: MISS from proxyjkt1.centrin.net.id [11] => X-Cache-Lookup: MISS from proxyjkt1.centrin.net.id:8088 [12] => Via: 1.0 proxyjkt1.centrin.net.id:8088 (squid/2.6.STABLE6) [13] => Connection: close [14] => HTTP/1.0 302 Moved Temporarily [15] => Location: http://74.125.11.82/get_video?video_id=BjPv_xm_dHQ&origin=dal-v131.dal.youtube.com [16] => X-Cache: MISS from proxyjkt1.centrin.net.id [17] => X-Cache-Lookup: MISS from proxyjkt1.centrin.net.id:8088 [18] => Via: 1.0 proxyjkt1.centrin.net.id:8088 (squid/2.6.STABLE6) [19] => Connection: close [20] => HTTP/1.0 302 Moved Temporarily [21] => Location: http://dal-v131.dal.youtube.com/get_video?video_id=BjPv_xm_dHQ [22] => X-Cache: MISS from proxyjkt1.centrin.net.id [23] => X-Cache-Lookup: MISS from proxyjkt1.centrin.net.id:8088 [24] => Via: 1.0 proxyjkt1.centrin.net.id:8088 (squid/2.6.STABLE6) [25] => Connection: close [26] => HTTP/1.0 200 OK [27] => Expires: Tue, 05 Feb 2008 16:55:51 GMT [28] => Cache-Control: max-age=3600 [29] => Content-Type: video/flv [30] => ETag: "-1264444879" [31] => Last-Modified: Thu, 24 Jan 2008 17:30:37 GMT [32] => Content-Length: 8830038 [33] => Date: Tue, 05 Feb 2008 15:55:51 GMT [34] => Server: lighttpd/1.4.18 [35] => X-Cache: MISS from proxyjkt2.centrin.net.id [36] => X-Cache-Lookup: MISS from proxyjkt2.centrin.net.id:8088 [37] => Via: 1.0 proxyjkt2.centrin.net.id:8088 (squid/2.6.STABLE6) [38] => Connection: close )Perhatikan. Tempat download file flv = [8] => Location: http://dal-v131.dal.youtube.com/get_video?video_id=BjPv_xm_dHQ
Besar file => [32] => Content-Length: 8830038
That's all. Ternyata lebih simple yg ini daripada yang dibatam.com. gpp lah... dah terlanjur :)
0 Responses to "Konsep donwload video youtube"
Post a Comment