PowerShell v2 Youtube Video Downloader

PowerShell v2 Youtube Video DownloaderThis script requires PowerShell v2 in it’s final version (as included in Windows 7 RTM).

This script will download any Youtube video in it’s best available quality as an MP4 file.

Syntax: GetYouTube Video-ID

Example: GetYouTube irp8CNj9qBI

Of course, one can also send a list of video ids to the script via a prepared text file, like so:

foreach ($video in get-content list.txt) { getyoutube.ps1 $video  } 

Here is the script GetYouTube.ps1:

Import-Module bitstransfer
$ErrorActionPreference = "SilentlyContinue"
$v=$args[0]
#$v="irp8CNj9qBI"
#Grab Youtube Page
$s=(New-Object System.Net.WebClient).DownloadString("http://www.youtube.com/watch?v=" + $v)
#extract token
$t=$s | % {$_.substring($_.IndexOf("`"t`": `"")+6,44)}
#extract title
$r="<title\b[^>]*>YouTube - (.*?)</title>" ; $f = $s | ?{ $_ -match $r } |  %{ $_ -match $r | out-null ; $matches[1] }
#Try downloading 720p version of video
$u = "http://www.youtube.com/get_video?fmt=22&video_id=" + $v + "&t=" + $t
$o = $Env:Userprofile + "\Videos\" + $f + "(HQ).mp4"
Start-BitsTransfer –source $u -destination $o
#Try downloading regular mp4 version of video, if HQ version failed
if (!$?) {
$u = "http://www.youtube.com/get_video?fmt=18&video_id=" + $v + "&t=" + $t
$o = $Env:Userprofile + "\Videos\" + $f + ".mp4"
Start-BitsTransfer –source $u -destination $o
}

Kommentare (29) -

Christoph
Christoph
11.11.2010 22:18:09 #

Hallo Christian,
leider scheint dein kleines script nichtmehr sonderlich gut zu funktionieren

杭州夜生活
杭州夜生活
14.05.2011 21:38:12 #

最专业的杭州酒吧网,提供丰富的酒吧消费指南、酒吧人才、酒吧音乐、杭州夜生活、夜店、杭州交友酒吧、杭州演艺酒吧和休闲娱乐资讯信息,宏扬酒吧文化,倡导健康文明的酒吧休闲娱乐活动。

英文外链
英文外链
05.10.2011 19:42:01 #

新版本URL外链收割机收割思路
1、根据别人的某个站,找他的外链发布地址,找出它是在哪里发的外链;
或根据URL和页面的特征,找针对性页,比如blogengine类型BLOG的评论页,留言本,论坛帖子页等;
2、去分析这些收割来的地址,
(1)看看是否dofollow(2)是否是可以发布的页(3)出链数多少以及(4)谷歌是否收录(5)页面的pr值;
3、这些已经是可以用的外链发布页了,再拿这些页去找,都有哪些站在这里发过外链 (其实又找到了很多 所谓的别人的站 就又可以进行第一步开始的循环)
最终就是找到大量的可以发布外链的地址!

尼龙扎带
尼龙扎带
05.10.2011 19:42:05 #

温州尼龙扎带,温州防水电缆接头,温州防水接线盒厂,扎带固定座报价

尼龙扎带
尼龙扎带
05.10.2011 19:42:10 #

尼龙扎带首选乐清市创新机械有限公司,专业尼龙扎带厂家,产品规格齐全,品质优异。

This content a realistic look at the issue. A great deal love, at the very least out of everyone with the fantastic, i love to go through vistas that will showing valuable in aspect.

Playinator Review
Playinator Review
05.11.2011 00:48:14 #

Thanks, this is a helpful post.

johhny 5
johhny 5
13.11.2011 21:15:00 #

Holy crap, Detroit is looking more like a zombie movie... I just watched this youtube video posted on DailyMotion and had no idea the city was reduced to rubble. It's literally in ruins. <A href="www.youtube.com/watch?v=px6N9xMqoCg">A Tour Of Detroit's Ghetto 2011</A>

Dunia Digital
Dunia Digital
20.11.2011 16:05:57 #

Thanks for sharring importent information in this blog. It was very nice.

Dunia Digital
Dunia Digital
22.11.2011 13:27:10 #

Hi there thank for give us valuable information in your blog i hope you can provide more information like this in future. Thanks friends.

jenis phobia
jenis phobia
22.11.2011 16:25:44 #

I like this site very much so much fantastic information.

kitchenaid parts
kitchenaid parts
26.11.2011 10:01:02 #

Hi there thank for give us valuable information in your blog i hope you can provide more information like this in future. Thanks friends

strategi pemasaran email
strategi pemasaran email
26.11.2011 20:55:10 #

hey thanks for providing a very nice information and please keep on posting great informations

Dunia Digital
Dunia Digital
30.11.2011 08:19:32 #

Suppose it's a useful post indeed! Just bookmarked it!

inspirational quotes
inspirational quotes
02.12.2011 23:14:49 #

hi there i just wanted to mention i litle bit disagree with your post and many your post not make sense

cinta
cinta
05.12.2011 11:18:11 #

I am genuinely pleased to glance at this weblog posts which includes lots of valuable facts.thanks for providing these information.

cinta
cinta
06.12.2011 20:32:44 #

I am genuinely pleased to glance at this weblog posts which includes lots of valuable facts.thanks for providing these information.

inspirational quotes
inspirational quotes
18.12.2011 21:06:54 #

hi there i just wanted to mention i litle bit disagree with your post and many your post not make sense

kim holland sex
kim holland sex
24.12.2011 08:54:45 #

These choirs were often made up of workers from one village or one coal mine and so it was fairly natural for men to sing when one village played against another, especially if that game was Wales' national sport of rugby.

mobile phone
mobile phone
25.12.2011 19:53:44 #

Hey there..such a great content.Keep it up and i will always follow you..Thank you.

captcha sniper discount
captcha sniper discount
04.01.2012 16:27:11 #

I¡¦ve recently started a blog, the info you provide on this web site has helped me tremendously. Thank you for all of your time & work.

2012 NCAA Tournament Bracket
2012 NCAA Tournament Bracket
02.02.2012 11:01:16 #

Hey would you mind sharing which blog platform you're using? I'm going to start my own blog in the near future but I'm having a difficult time selecting between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I'm looking for something completely unique.                  P.S My apologies for getting off-topic but I had to ask!

kinderbed
kinderbed
19.02.2012 09:01:02 #

Love your artical!

Fundraising
Fundraising
02.03.2012 08:05:18 #

Hello would you mind sharing which blog platform you're using? I'm going to start my own blog soon but I'm having a hard time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I'm looking for something completely unique.                  P.S Sorry for getting off-topic but I had to ask!

Jubah Muslimah
Jubah Muslimah
12.03.2012 09:15:44 #

hello how are you i hope you can be my friends feel free to visit my blog and leave a comment too i will waiting for you and i hope you will have an nice day

White Card
White Card
13.03.2012 00:18:03 #

Today, I went to the beach with my kids. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is completely off topic but I had to tell someone!

Klaudije M.
Klaudije M.
13.05.2012 17:13:45 #

I’m impressed, I need to say. Actually not often do I encounter a blog that’s each educative and entertaining, and let me inform you, you may have hit the nail on the head. Your concept is outstanding; the difficulty is one thing that not enough people are speaking intelligently about. I am very completely happy that I stumbled throughout this in my search for one thing relating to this.

Miami Foreclosures
Miami Foreclosures
26.07.2012 02:32:40 #

I’ve been going to your blog to get a although now and I constantly obtain a gem within your new posts. Thanks for sharing!

Miami Foreclosures
Miami Foreclosures
27.07.2012 02:01:39 #

Thanks for taking this opportunity to discuss this, I really feel strongly about it and I take pleasure in learning about this topic.

Kommentar schreiben

  Country flag

biuquote
  • Kommentar
  • Live Vorschau
Loading

Facebook

Letzte Tweets

Twitter Mai 26, 23:39
Gelbe Engel! Danke!

Twitter Mai 18, 21:34
Finland was terrible. #Eurovision

Twitter Mai 17, 12:49
just blogged Ist das Surface Pro teuer? – Ein Fact-Check: Gestern wurde angekündigt, dass das Surface Pro in D... http://t.co/PhW7qzhkUq

Folge mir auf Twitter!

Über den Autor

MCTS

Christian Haberl Christian Haberl ist seit mehr als 10 Jahren als EDV Berater, Vortragender und Trainer tätig. Er kann sich nicht für ein Spezialgebiet entscheiden, drum heißt dieser Blog auch "Kraut & Rüben Blog" - Unter seine Interessen fallen Web-Entwicklung auf ASP.NET Basis, Information Worker & Productivity Technologien (Windows, Office), Server (Windows Server, Small Business, Virtualisierung, Exchange), Scripting, Spam Filtering/Security und Digital Home. Christian Haberl ist auch einer der führenden Produktspezialisten für Windows Media Center und Windows Home Server und ist Direktor des ClubDigitalHome.
Im Jahr 2008 hat Christian Haberl über 200 Vorträge und Schulungen durchgeführt.
Im Frühjahr 2009 wurde Christian Haberl von Microsoft Österreich zum "Influencer" ernannt, weiters wurde er Microsoft Certified Technology Specialist / Microsoft Certified Connected Home Integrator sowie Microsoft Certified Consumer Sales Specialist.

Month List

Netzwerk Management

Bandwidth

RecentComments

Comment RSS