Пример #1
0
        public string FixFFdotNet(string vsUrl)
        {
            string sFFdef1 = "http://m.fanfiction.net/s/";

            if ((vsUrl.Substring(0, 26) == sFFdef1))
            {
                vsUrl = vsUrl.Replace("http://m.fanfiction.net/s/", "http://www.fanfiction.net/s/");
            }


            if (vsUrl.Substring(0, 28) == "http://www.fanfiction.net/s/")
            {
                bool   blnFound = true;
                int    icnt     = 29;
                string sId      = "";
                while (blnFound)
                {
                    if (vsUrl.Substring(icnt, 1) == "/")
                    {
                        int    iStart      = icnt + 1;
                        int    iEnd        = iStart;
                        int    iLeng       = 0;
                        string sOldChapter = "";
                        while (vsUrl.Substring(iEnd, 1) != "/")
                        {
                            sOldChapter = sOldChapter + vsUrl.Substring(iEnd, 1);
                            iEnd       += 1;
                            iLeng      += 1;
                        }
                        //iLeng += 1;
                        //sOldChapter = sOldChapter;
                        string sStartUrl = vsUrl.Substring(0, iStart);
                        string sEnd      = vsUrl.Substring(iEnd);
                        vsUrl = sStartUrl + "1" + sEnd;
                        cFFdotNetFic oFic = new cFFdotNetFic();
                        oFic.StoryLink = vsUrl;
                        oFic.StoryId   = sId;
                        oFFdotNets.Add(oFic);
                        blnFound = false;
                    }
                    else
                    {
                        sId += vsUrl.Substring(icnt, 1);
                    }
                    icnt = icnt + 1;
                }
            }
            return(vsUrl);
        }
Пример #2
0
 public void Add(cFFdotNetFic oFic)
 {
     throw new NotImplementedException();
 }