in my application,user can download and play videos from different video sites like bofunk.com,dailymotion.com,youtube.com,metacafe.com,stupid videos.com etc.what is the idea behind downloading videos from different sites.i implemented a method and is working for some sites.That is by generating a downloadable url from the html string.But this same method is not working for other sites.Can anyone guide me o this?thanks in advance.This is what i have tried and is working for 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;
}
`But is not working for sites like dailymotion.com.Is it an issue related to any kind of encryption on these sites?