Click to See Complete Forum and Search --> : need help how to write a function...
pushacat
February 8th, 2010, 10:28 AM
Hey guys,
I need a help to write such function:
Input - string - Youtube url -
(for example, http://www.youtube.com/watch?v=_xxxxxxxxxx
Output - string - flv file url -
(for example, http://xxxxxxxxxxxxxxxxxxxxxxxxx.flv)
Please advice.
Thanks in advance!
rocky_upadhaya
February 8th, 2010, 11:13 AM
I was not clear to your Question but Here what I've understood:
string Utube=" http://www.youtube.com/watch?v="
public void uTube()
{
Utube += Input.Text;
System.Diagnostics.Process.Start(Utube);
}
pushacat
February 8th, 2010, 11:33 AM
I was not clear to your Question but Here what I've understood:
string Utube=" http://www.youtube.com/watch?v="
public void uTube()
{
Utube += Input.Text;
System.Diagnostics.Process.Start(Utube);
}
THanks for your answer. Your code is opening url.
I need something slightly different.
Youtube internally stores clips in .flv format.
So, I need to write a function on C# to get the .flv path according to url - http://www.youtube.com/watch?v=xxxxxxxxx.
So, the input of the function would be http://www.youtube.com/watch?v=xxxxxxxxx;
the output - will be string indicating the path of .flv file.
Arjay
February 8th, 2010, 12:03 PM
Why do you care about the internal location that youtube uses to store their files?
pushacat
February 8th, 2010, 02:41 PM
Why do you care about the internal location that youtube uses to store their files?
Because I want to write application that will save some youtube clip locally on my PC.
To do it I need to know exact .flv file path+name.
Arjay
February 8th, 2010, 03:28 PM
Because I want to write application that will save some youtube clip locally on my PC.
To do it I need to know exact .flv file path+name.I suspect that YouTube doesn't allow users to save clips locally.
Why not ask YouTube directly?
http://code.google.com/apis/youtube/overview.html
At the lower right corner of the page are a few links to YouTube community sites. I bet you can find out if downloading clips is allowed, and if it is, get an answer on how to do it.
memeloo
February 9th, 2010, 02:28 AM
if downloading youtube clips is not allowed then how do I watch them? every browser saves all clips locally. it's not possible to not save them.
foamy
February 9th, 2010, 07:43 AM
There's a difference between your browser caching data locally and saving a copy of the content...
I think what Arjay is trying to say is that if creating this application is not against Youtube's terms of use, the community should be able to point him in the right direction. If it is against the terms, he (and I) would be reluctant to help in creating this application.
memeloo
February 9th, 2010, 08:35 AM
I think what Arjay is trying to say is that if creating this application is not against Youtube's terms of use
so what? I'm not a lawyer and don't have to know the terms of use of every website on the internet.
this is the place to give/get some technical advise if possible (this time I cannot help) and if the OP does some evil things with this knowledge or brakes some terms of use I don't care.
mariocatch
February 9th, 2010, 10:44 AM
so what? I'm not a lawyer and don't have to know the terms of use of every website on the internet.
this is the place to give/get some technical advise if possible (this time I cannot help)...
we're not mindless zombies that just sit here and answer questions... we use common sense too.
knowing the terms of use for every website on the internet is not the same as having common sense.
you don't have to be a rocket scientist to know if someone is asking how to start a hidden application on system boot, and capture key strokes to know they're planning on writing a key logger. just use your own judgement before answering people's questions.
...and if the OP does some evil things with this knowledge or brakes some terms of use I don't care.
you would care if it was you or your terms of use being violated.
memeloo
February 9th, 2010, 11:02 AM
...if someone is asking how to start a hidden application on system boot, and capture key strokes to know they're planning on writing a key logger
I didn't know, I have no clairvoyant abilities and if everyone would think this way we had to ban the selling of knives because the person buying it is perhaps planning to kill someone. such reasoning I just find silly. we also had to ban even speaking because you can say bad words to someone and hurt him so better we don't even learn to speak.
nelo
February 9th, 2010, 11:51 AM
I didn't know, I have no clairvoyant abilities and if everyone would think this way we had to ban the selling of knives because the person buying it is perhaps planning to kill someone. such reasoning I just find silly. we also had to ban even speaking because you can say bad words to someone and hurt him so better we don't even learn to speak.
Well I think everyone is entitle to their opinion. Personally I do care about what others do with the information I give them. For example I like to know that I'm not wasting my time. I also like to know that they are not wasting their time by doing things in needlessly complicated ways. If I have reason to believe that person I'm about to help has dubious intentions I always ask wha they are trying to do. There is normally a good reason/explanation but I cannot assume that. And whilst my help maybe used malicious at least it will be without me knowing or being complicit with it.
Whilst we are not accountable for what other developers do I think we have a measure of responsibility for the development community as whole. I mean that's why we are on forums like this...to learn from each other and to help others in their learning, to learn to program the right way and solve problems. New developers may not be aware of the implications of what they are attempting to do so it doesn't hurt if a few wise heads ask questions when there is indication of possible malicious intent or intent that could violate laws (e.g. copyright laws, privacy, etc)
foamy
February 10th, 2010, 03:32 AM
so what? I'm not a lawyer and don't have to know the terms of use of every website on the internet.
this is the place to give/get some technical advise if possible (this time I cannot help) and if the OP does some evil things with this knowledge or brakes some terms of use I don't care.
Well it's a question of moral integrity then. I would never aid anyone in creating code that violates someone's terms of use or perhaps even local law.
nelo said it well, whether you want to admit it or not, we as a community have an inherent responsibility for what is created with our help. Therefore it is only natural that the majority of us will question the intent of some software when its purpose is not apparent.
memeloo
February 10th, 2010, 05:16 AM
we as a community have an inherent responsibility for what is created with our help
no we have not. why should we? let's say I have some business and I produce the mentioned knives. should I feel responsible if someone who bought my knive kills someone else? I don't think so.
Therefore it is only natural that the majority of us will question the intent of some software when its purpose is not apparent.
sure, then next time when there is a question about how to create a database connection you answer the OP that you cannot help him because he might want to steal some data from a bank or so.
or perhaps another person wants to open/create a file and save some text in it. following your reasoning he might want to save the logged keystrokes he just captured with his keylogger. in this case any help couldn't be provided too.
nelo
February 10th, 2010, 05:38 AM
no we have not. why should we? let's say I have some business and I produce the mentioned knives. should I feel responsible if someone who bought my knive kills someone else? I don't think so.
Yes you have a valid point. But there are many cases where society puts constraints to prevent people from harming themselves or causing harm to others. In some places you would not be able to buy a knife (or alcoholic drinks) unless you are above a certain age. The shop owner has the responsibility of checking the person's age if he/she has reason to believe that they are under age. If the person is of legal age they just show their id and the seller is happy to sell them the knife or alcohol knowing he has complied the law in that society (personally I think this is good sense even if there is no law)
sure, then next time when there is a question about how to create a database connection you answer the OP that you cannot help him because he might want to steal some data from a bank or so.
When you speak like this it seems like you just want to keep the argument going. There is nothing suspicious about someone asking how to connect to a database. But if someone asks how to write some script to put on a web page that can lookup the databases on a client machine and connect them I think there is reason to be suspicious of the person's intentions.
Nobody is saying don't help people open files, connect to databases, keep track of user interactions. What most of us (I mean the ones on this particular thread) are trying to say is that we would be relunctant to help someone if we had reason to believe (without the need for clairvoyance or other supernatural means) the person is attempting to do something unlawful.
foamy
February 10th, 2010, 05:43 AM
no we have not. why should we? let's say I have some business and I produce the mentioned knives. should I feel responsible if someone who bought my knive kills someone else? I don't think so.
You're missing my point. If we teach someone how to stab with a certain type of knife, we have a part of the responsibility when that knowledge is used in a murder.
Arjay
February 10th, 2010, 11:22 AM
The bottom line is that asking questions (or giving answers to) topics that are believed to be related to hacking is in violation of the Acceptable Use Policy (http://www.internet.com/Internetcom/Door/41221) which everyone signs when joining the forum.
So members of the forum need to use good judgement before answering questions that may be perceived as hacking related.
A couple of clarifying questions are all that is required to determine the intent of the poster. Those with less than honorable intentions will usually go away when asked what they're trying to do.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.