[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

QUICK! WRITE A SCRIPT THAT DOWNLOADS ALL THE VIDEOS FROM A YOUTUBE

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 26
Thread images: 5

File: 11944930.jpg (143KB, 442x400px) Image search: [Google]
11944930.jpg
143KB, 442x400px
QUICK! WRITE A SCRIPT THAT DOWNLOADS ALL THE VIDEOS FROM A YOUTUBE PLAYLIST AND CONVERTS THEM INTO MP3s IN A SINGLE FOLDER.

OR THE BIRD IS GOING TO STAB YOU!
>>
Come at me, feg
>>
>>57082468
youtube-dl -x URL
>>
Its called jDownloader, birdie, how does one not know it in 2016?
>>
youtube-dl -f bestaudio -x --audio-format mp3 --audio-quality 2 <url>
>>
>>57082469
>>57082478
>>57082481
0/10

>>57082492
Did you honestly expect to work

Death count: 4
>>
>>57082478
>>57082481
>>57082492
Please do not spoonfeed non-contributors.
>>
File: a.webm (153KB, 570x272px) Image search: [Google]
a.webm
153KB, 570x272px
>>57082512
>Did you honestly expect to work
Werks For Me
>>
Fuck off, Tyrone. We are not your code monkeys for your shitty comp sci degree.
>>
>>57082607
Go back to work rajesh
>>
>>57082468
No need to write a script when 4kvideodownloader exists.
>>
>>57082569
Doesn't work

ERROR: Signature extraction failed: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 905, in _decrypt_signature
video_id, player_url, s
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 820, in _extract_signature_function
res = self._parse_sig_js(code)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 883, in _parse_sig_js
initial_function = jsi.extract_function(funcname)
File "/usr/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 241, in extract_function
raise ExtractorError('Could not find JS function %r' % funcname)
ExtractorError: Could not find JS function u'lt'; please report this issue on https://yt-dl.org/bug .
>>
>>57082729
are you running the latest version?
can you post the playlist url?
>>
>>57082733
Maybe vevo shit.
>>
>>57082468
Do you feel in charge?
>>
>>57082468
>CONVERTS THEM INTO MP3s

ew why? The right answer is >>57082478

Of course the real right answer is "Just down the fucking album off tpb you fucking retard."
>>
>>57082733
Yeah

https://www.youtube.com/playlist?list=PLf7sttsrRSF6RNW2dW5m2ZnvT1CNF7y-Q
>>
>>57082771
rekt
>>
File: a.png (71KB, 575x373px) Image search: [Google]
a.png
71KB, 575x373px
>>57083086
working here
>>
>>57082492
>bestaudio
Not required

youtube-dl -ix -k --audio-format mp3 http://www.youtube.com/playlist?list=XXXXXXXXXXX

t. youtube-dl dev
>>
File: a.png (15KB, 524x280px) Image search: [Google]
a.png
15KB, 524x280px
>>57083288
i'm waiting to see which comes first, op getting it working, or me uploading the result at 100kB/s
>>
>>57082468

Well, I got a Ruby script here.

The only problem is I can only fetch the HTML and not the actual videos. I thinks you somehow have to resolve the actual video link or somethink like that, but right now I don't feel like figuring it out..


require 'rubygems'
require 'open-uri'
require 'nokogiri'


PAGE_URL = "https://www.youtube.com/playlist?list=PL5A408DF7FB9A7F06"
page = Nokogiri::HTML(open(PAGE_URL))

l = page.css('a[class=yt-uix-sessionlink]')
.reduce([]) { |acc, l| acc << l['href'] }
.select{ |l| l.size > 2}
.map {|l| "http://www.youtube.com" << l}

l.each do |link|
puts "[ Downloading #{link}.. ]\n\n"
`wget "#{link}"`
end
>>
>>57082468
Do it yourself dude. Then you can write the next script too.
>>
>>57083319
Good effort
>>
>>57083319

Well fuck me..


There is already a Rubygem that does that:

>https://www.ruby-toolbox.com/projects/yt_mp3
>https://github.com/Kofel/yt_mp3
>>
>>57083339

Thanks, it's been fun to figure that out.

I have never been using that "Nokogiri" gem before, it's powerfull and yet simple to use.
Thread posts: 26
Thread images: 5


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.