using System; using System.Collections.Generic; using System.Text; using System.Web; using MyDownloader.Core; namespace MyDownloader.Extension.Video.Impl { public class MetaCafeVideoDownloader: BaseVideoDownloader { public const string SiteName = "Meta Cafe"; //http://www.metacafe.com/watch/851582/village_idiots/ public const string UrlPattern = @"(?:[Mm][Ee][Ta][Aa][Cc][Aa][Ff][Ee]\.[Cc][Oo][Mm]/watch/)(\w[\w|-]*)/(\w[\w|-]*)"; protected override ResourceLocation ResolveVideoURL(string url, string pageData, out string videoTitle) { url = TextUtil.JustAfter(pageData, "mediaURL=", "&"); videoTitle = TextUtil.JustAfter(pageData, "<title>", "</title>"); return ResourceLocation.FromURL(HttpUtility.UrlDecode(url)); } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)