473,396 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How do i download specific videos of youtube using a certain keyword?

Hi, I wanna download of the Machinima channel only the videos that have the word "trailer" it thier title.
whats the code for something like that?
Aug 13 '10 #1
3 2208
GaryTexmo
1,501 Expert 1GB
The code you're going to have to write yourself. As for the how, I don't know how to download videos from youtube, but I know you can parse the HTML for the page. I just took a look at the HTML for a youtube page and found this...

<meta name="title" content="THE TITLE OF THE VIDEO">
This is pretty easy to find.

That's on a video page itself though, you'd probably have to sift through the channel code. I'd imagine there's a link for the video page itself, which you could then go to and find a link to download the video.

I hope that points you in the right direction, good luck!
Aug 13 '10 #2
Thaks a lot mate :)
Aug 13 '10 #3
HaLo2FrEeEk
404 256MB
Take a look at the Youtube API. There are ways of finding out how many videos a user has uploaded, and the getting an XMl list of just that user's videos.

http://gdata.youtube.com/feeds/api/users/user

Use that to load an XML file with information about user, which includes the number of uploads.

http://gdata.youtube.com/feeds/api/users/user/uploads/?v=2

Use this to load the videos for that user. This will load the most recent 25 videos, but there are parameters you can use to get at the rest:

start-index=# Use this to tell the feed to start a certain way in.
max-results=# Self explanatory, the maximum number of videos returned. The most you can have is 50.

http://gdata.youtube.com/feeds/api/users/user/uploads/?v=2&start-index=25&max-results=25

This will return 25 results starting at the 26th-most-recent video, so it'll return videos 26-50.

I haven't been able to figure out a way to download the videos using the API yet. It's possible to do it another way, but it's not remotely feasible for this application, in fact it wouldn't work at all. This should get you started though. I would recommend reading the number of uploaded videos from the user XML, then looping through reading the uploaded videos feed, reading 50 videos at a time using max-results=50, and adjusting start-index accordingly, until you've reached the total number of videos.

Example, if there are 135 videos, reading 50 videos per page, you'll need at least 3 pages, so your loop would iterate 3 times. As of this posting the Machinima channel has 10,546 videos, so you'd want Math.ceiling(10546 / 50) = 211 iterations of your loop. Do yourself a favor though, don't use that number, read it from the user feed and generate the number of iterations at runtime.
Aug 15 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Guy Robinson | last post by:
Hello, I have a list of class instances. I wish to get the appropriate class attribute in each class instance depending on a SINGLE keyword in the calling class. How do I get the calling...
4
by: Philipp Sumi | last post by:
Hello all I have a thread that performs some simple I/O within a loop that runs on a separate thread. I used the using keyword to ensure the writer's disposal: using (writer) { while...
7
by: Willem van Rumpt | last post by:
Hi all, coming from an unmanaged programming background, I took my time to sort out the IDisposable and finalizer patterns. Just when I thought I had it all conceptually neatly arranged, the...
3
by: flat_ross | last post by:
For anyone who is just getting into VB.NET and/or is starting to work with inheritance I would like to point out a potential pitfall. We found this confusion recently when code-reviewing an...
4
by: NetMasker | last post by:
How can I reference a form (from withing a module for example) and make it visible without using the keyword "Me" ? I tried with the following code but nothing happened: Public myform As Form1...
6
by: semkaa | last post by:
Can you explain why using ref keyword for passing parameters works slower that passing parameters by values itself. I wrote 2 examples to test it: //using ref static void Main(string args) {...
25
by: samjnaa | last post by:
Please check for sanity and approve for posting at python-dev. In Visual Basic there is the keyword "with" which allows an object- name to be declared as governing the following statements. For...
1
by: techcreater | last post by:
hi i want to know about how software updates is download on client pc using xml file in any of language.
1
by: vikassawant | last post by:
Hi, I m facing some critical problem for downloading 5mb file from server. Does anyone know? How to reduce the time to download file from server using HTTP connection?
16
by: GVNPublic123 | last post by:
Hello, What I am trying to do, is login YouTube using C# (HTTPWebRequest). The problem is, I don't really know how to do it. Is there any URL I could fill using the username and pass and...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.