从iPhone不同的视频网站下载视频(downloading videos from differe

2019-09-20 18:54发布

在我的应用程序,用户可以下载并播放不同视频网站的视频像bofunk.com,dailymotion.com,youtube.com,metacafe.com,愚蠢videos.com etc.what是实现不同sites.i下载视频背后的想法的方法,并工作了一段sites.That是通过生成从string.But这种方法同样不为其他网站中。任何工作HTML下载的URL引导我O本?感谢advance.This是我曾尝试和正在为bofunk.com

`-(BOOL)searchForVideoInBOFUNKHTML:(NSString*)htmlString;
{
    NSString *strHTML=[NSString stringWithFormat:@"%@",htmlString];       
    NSString *newString; 

    if ([htmlString rangeOfString:@"id=\"vidplaya\""].location == NSNotFound) 
    {
        return  false;
    }   
    else
    {
        htmlString = [strHTML substringFromIndex:[htmlString rangeOfString:@"id=\"vidplaya\""].location];

        htmlString=  [htmlString stringByReplacingOccurrencesOfString:[htmlString substringFromIndex:100]
                                                        withString:@""];



            newString =[htmlString stringByReplacingOccurrencesOfString:[htmlString substringFromIndex:[htmlString rangeOfString:@"quality"].location] withString:@""];
        NSLog(@"%@",newString);

            newString = [[[newString substringFromIndex:[newString rangeOfString:@"/"].location] substringFromIndex:3] stringByReplacingOccurrencesOfString:@"\"" withString:@""];
         NSLog(@"%@",newString);

            newString = [newString stringByReplacingOccurrencesOfString:@" " withString:@""];
         NSLog(@"%@",newString);


            embededURL = [[NSString alloc] initWithFormat:@"http://media.bofunk.com/media/flvs/%@.flv",newString]; 

        NSLog(@"%@",embededURL);
            return true;

    }
    return  false;

}

`但是不工作像dailymotion.com.Is这关系到这些网站上的任何种类的加密问题的网站?

Answer 1:

位DailyMotion提供了一个适用于iOS API 。 所以,你可以使用它。 但是,不要指望它与其他服务工作。 你将不得不执行他们都一个接一个。 他们中有些人可能无法与外部软件使用。



Answer 2:

下面是有关如何从YouTube下载MP4数据的讨论。

样本项目精细的下载方式 。 这可能会帮助你。

将YouTube视频到iPhone的应用程序



文章来源: downloading videos from different video sites in iPhone