/// <summary>
        /// Converts a URL from mtgdecks.net into a ConverterDeck which is populated with all cards and deck name.
        /// </summary>
        /// <param name="url">The URL of the Deck</param>
        /// <param name="deckSectionNames">List of the name of each section for the deck being converted.</param>
        /// <param name="convertGenericFileFunc">
        /// Function to convert a collection of lines from a deck file into a ConverterDeck.
        /// Used when downloading a Deck File from a webpage instead of scraping.
        /// </param>
        /// <returns>A ConverterDeck which is populated with all cards and deck name</returns>
        public override ConverterDeck Convert(
            string url,
            IEnumerable <string> deckSectionNames,
            Func <IEnumerable <string>, IEnumerable <string>, ConverterDeck> convertGenericFileFunc)
        {
            // Remove any arguments from the url
            if (url.Contains('?'))
            {
                url = url.Split('?')[0];
            }

            return(WebpageConverter.ConvertDownloadURL(
                       url + "/dec",
                       deckSectionNames,
                       convertGenericFileFunc));
        }
        /// <summary>
        /// Converts a URL which needs to be altered to get the download link, then uses it to return a ConverterDeck which is populated with all cards and deck name.
        /// </summary>
        /// <param name="inputURL">The originally requested URL of the Deck</param>
        /// <param name="deckIdKey">The key for the URL Parameter which contains the ID value for the deck</param>
        /// <param name="urlPrepend">The URL part which precedes the deckIdKey</param>
        /// <param name="urlPostpend">The URL part which follows the deckIdKey</param>
        /// <param name="deckSectionNames">List of the name of each section for the deck being converted.</param>
        /// <param name="convertGenericFileFunc">
        /// Function to convert a collection of lines from a deck file into a ConverterDeck.
        /// Used when downloading a Deck File from a webpage instead of scraping.
        /// </param>
        /// <returns>A ConverterDeck which is populated with all cards and deck name</returns>
        protected static ConverterDeck ConvertURLUsingDeckIDInURL(string inputURL, string deckIdKey, string urlPrepend, string urlPostpend, IEnumerable <string> deckSectionNames, Func <IEnumerable <string>, IEnumerable <string>, ConverterDeck> convertGenericFileFunc)
        {
            int    deckID;
            string deckIDString;

            // Try to get the value for the parameter with the name in deckIdKey
            if (WebpageConverter.GetParams(inputURL).TryGetValue(deckIdKey, out deckIDString))
            {
                // Try to convert the found value into an integer
                if (int.TryParse(deckIDString, out deckID))
                {
                    // Construct a URL which is the download link for the Deck, then convert it
                    string downloadableDeckURL = urlPrepend + deckID + urlPostpend;
                    return(WebpageConverter.ConvertDownloadURL(downloadableDeckURL, deckSectionNames, convertGenericFileFunc));
                }
            }

            return(null);
        }
        /// <summary>
        /// Converts a URL from tappedout.net into a ConverterDeck which is populated with all cards and deck name.
        /// </summary>
        /// <param name="url">The URL of the Deck</param>
        /// <param name="deckSectionNames">List of the name of each section for the deck being converted.</param>
        /// <param name="convertGenericFileFunc">
        /// Function to convert a collection of lines from a deck file into a ConverterDeck.
        /// Used when downloading a Deck File from a webpage instead of scraping.
        /// </param>
        /// <returns>A ConverterDeck which is populated with all cards and deck name</returns>
        public override ConverterDeck Convert(
            string url,
            IEnumerable <string> deckSectionNames,
            Func <IEnumerable <string>, IEnumerable <string>, ConverterDeck> convertGenericFileFunc)
        {
            Match m = Regex_tappedout_net.Match(url);

            if (m.Success)
            {
                string deckName = m.Groups[1].Value;
                return(WebpageConverter.ConvertDownloadURL(
                           @"http://tappedout.net/mtg-decks/" + deckName + @"/?fmt=txt",
                           deckSectionNames,
                           convertGenericFileFunc));
            }
            else
            {
                throw new InvalidOperationException();
            }
        }