예제 #1
0
        public ArrayList alys(string content, string path, string path1)
        {
            ArrayList resList = new ArrayList();

            string[] contents = content.Split(new string[] { "<h3>" }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string s in contents)
            {
                if (!s.Contains("Torrent Name"))
                {
                    continue;
                }
                if (nIn1Reg.IsMatch(s))
                {
                    if (!File.Exists(path))
                    {
                        File.Create(path).Close();
                    }
                    StreamWriter sw = File.AppendText(path);
                    sw.Write(s);
                    sw.Flush();
                    sw.Close();
                    continue;
                }
                His his = new His();
                his.HisTimeSpan  = 1;
                his.OriginalHtml = s;
                his.Vid          = r.Match(s).Value.Replace("Download <strong>", "").Replace("</strong>", "");
                if (!his.Vid.ToLower().Contains("1pond"))
                {
                    if (his.Vid.Split('-').Length > 2 && Tool.IsNum(his.Vid.Split('-')[1]))   //对于xxx-av-1234的修改,只考虑两个-的情况
                    {
                        his.Vid = his.Vid.Substring(0, his.Vid.LastIndexOf('-'));
                    }
                }
                his.Vid = his.Vid.Replace("-", "");
                string size      = sizeRegex.Match(s).Value.Replace("Size: ", "").Replace(".&nbsp;", "");
                string sizeDigit = size.Replace("Size:", "").Replace(".<br />", "").Replace("<br />", "");
                try
                {
                    if (sizeDigit.EndsWith("GB"))
                    {
                        sizeDigit = sizeDigit.Replace("GB", "");
                        his.Size  = Convert.ToDouble(sizeDigit) * 1024;
                    }
                    else
                    {
                        his.Size = Convert.ToDouble(sizeDigit.Replace("MB", "").Replace("KB", ""));
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine("CAN NOT FIND SIZE!!");
                    Console.WriteLine(e.Message);
                }
                his.Actress = actressRegex.Match(s).Value.Replace("Actress : ", "").Replace("</p>", "");
                getHtml(his, size);
                resList.Add(his);
            }
            return(resList);
        }
예제 #2
0
        // <a href="http://javjunkies.com/main/JavJ.php?k=2313&file=9054f637431322f526f6c615f54616b697a6177612e4d4153303837"><img src="./result1_files/118mas087pl.jpg"></a><br>
//Rola_Takizawa<br>Vídeo Id: MAS087<br>Sìze: 3.78GB<br><u>Fíles in tørrent:</u> 20 fìles<br>MAS ⁰  ⁸  ⁷ .ISO<br>
        void getHtml(His his, string size)
        {
            string imgUrl     = imageRex.Match(his.OriginalHtml).Value;
            string torrentUrl = torrentRex.Match(his.OriginalHtml).Value;

            his.Html = "<a href=\"" + torrentUrl + "><img src=\"" + imgUrl + "\"/></a><br>" + his.Vid + "<br>" + size + "<br>" + "<br>" + his.Actress + "<br>";
        }
예제 #3
0
        //http://hellojav.com/include/file_down.php?idx=19631
        void getHtml(His his, string size)
        {
            string imgUrl     = imageRex.Match(his.OriginalHtml).Value.Replace("none\" src=\"", "").Replace("\"", "");
            string torrentUrl = "http://hellojav.com/include/file_down.php?idx=" + torrentRex.Match(his.OriginalHtml).Value.Replace("popupPos(", "").Replace(",", "");

            his.Html = "<a href=\"" + torrentUrl + "\"><img src=\"" + imgUrl + "\"/></a><br>" + his.Vid + "<br>" + size + "<br>" + "<br>" + his.Actress + "<br>";
        }
예제 #4
0
        // <a href="http://javjunkies.com/main/JavJ.php?k=2313&file=9054f637431322f526f6c615f54616b697a6177612e4d4153303837"><img src="./result1_files/118mas087pl.jpg"></a><br>
//Rola_Takizawa<br>Vídeo Id: MAS087<br>Sìze: 3.78GB<br><u>Fíles in tørrent:</u> 20 fìles<br>MAS ⁰  ⁸  ⁷ .ISO<br>
        void getHtml(His his, string size)
        {
            string imgUrl     = imageRex.Match(his.OriginalHtml).Value;
            string torrentUrl = torrentRex.Match(his.OriginalHtml).Value;

            his.Html = "<a href=\"" + torrentUrl + "><img src=\"" + imgUrl + "\"/></a><br><a href=\"https://www.google.com.tw/search?um=1&newwindow=1&safe=off&hl=zh-CN&biw=1362&bih=839&dpr=1&ie=UTF-8&tbm=isch&source=og&sa=N&tab=wi&ei=QKr6U8KMKtOWaqbigogK&q=" + his.Vid + "\"/>" + his.Vid + "</a><br>" + size + "<br>" + "<br>" + his.Actress + "<br>\r\n";
            string[] searchStr = Tool.getId(his.Vid.ToLower());
            his.Html += "<a href=\"http://btdigg.org/search?info_hash=&q=" + searchStr[0] + "+" + searchStr[1] + "\"/>" + his.Vid + "</a><br>\r\n";
        }
예제 #5
0
        public override ArrayList alys(string content, string path, string vid, bool isCheckHis)
        {
            ArrayList list = new ArrayList();

            try
            {
                if (path.EndsWith("_magenet") || Path.GetFileNameWithoutExtension(path).StartsWith("http^__www.javbus.com"))
                {
                    return(new ArrayList());
                }

                string   id      = Path.GetFileNameWithoutExtension(path);
                string   img     = imgRegex.Match(content).Value;
                His      his     = new His();
                string[] strings = id.Split('-');
                if (strings.Length == 1)
                {
                    his.Vid = strings[0];
                }
                else
                {
                    his.Vid = strings[0] + strings[1];
                }
                StreamReader    sr         = new StreamReader(path + "_magenet");
                string          magContent = sr.ReadToEnd();
                MatchCollection mc         = sizeRegex.Matches(magContent);
                double          size       = 0;
                foreach (Match match in mc)
                {
                    double eachSize = 0;
                    string sizeStr  = match.Value;
                    if (sizeStr.Contains("GB"))
                    {
                        eachSize = Convert.ToDouble(sizeStr.Replace("GB", "")) * 1024;
                    }
                    else
                    {
                        eachSize = Convert.ToDouble(sizeStr.Replace("MB", ""));
                    }
                    size = eachSize > size ? eachSize : size;
                }
                Match matchName = nameRegex.Match(content);
                his.Name = matchName.Value.Replace("<h3>", "").Replace("</h3>", "");

                his.HisTimeSpan    = 6;
                his.IsCHeckHisSize = isCheckHis;
                his.Html          += "<img src=\"" + img + "\"/><br>\n<table>";
                his.Html          += magContent + "</table><br>\n";
                his.Size           = size;
                list.Add(his);
            }
            catch (Exception e)
            {
                Console.WriteLine("分析文件异常" + e.Message + path);
            }
            return(list);
        }
예제 #6
0
        void getHtml(His his, string size)
        {
            string imgUrl = "http://www.141jav.com/movies/" + imageRex.Match(his.OriginalHtml).Value.Replace("movies/", "");

            his.Html  = "<img src=\"" + imgUrl + "\"/><br>" + his.Vid + "<br>" + size + "<br>" + "<br>" + his.Actress + "<br>";
            his.Html += "<a href=\"http://www.141jav.com/file.php?n=" + his.Vid + "&q=torrage\">torrage</a><br>";
            his.Html += "<a href=\"http://www.141jav.com/file.php?n=" + his.Vid + "&q=ws\">ws</a><br>";
            his.Html += "<a href=\"http://www.141jav.com/file.php?n=" + his.Vid + "&q=zoink\">zoink</a><br>";
            his.Html += "<a href=\"http://www.141jav.com/file.php?n=" + his.Vid + "&q=torcahe\">torcahe</a><br>";
        }
예제 #7
0
        private string getImg(His his, string url)
        {
            Regex  r2      = new Regex("file=[a-z0-9]*");
            string torrent = r2.Matches(his.OriginalHtml)[0].Value;
            string res     = "";
            Regex  r       = new Regex("http://.*?\\)");
            string img     = r.Matches(his.OriginalHtml)[0].Value.Replace("'", "").Replace(")", "").Replace("&#39;", "");

            res = "<a href=\"" + url + "&" + torrent + "\"><img src=\"" + img + "\"></a><br>\r\n" + his.Info + "\r\n";
            return(res);
        }
예제 #8
0
 bool checkHis(His his)
 {
     if (DBHelper.searchHis(his) > 0)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
예제 #9
0
        //https://youiv.tv/data/attachment/forum/201803/13/230458ayftyotraggsy7ts.jpg
        public override System.Collections.ArrayList alys(string content, string path, string vid, bool ifCheckHis)
        {
            His       his     = new His();
            ArrayList resList = new ArrayList();

            //if (!Path.GetFileNameWithoutExtension(path).StartsWith("[") || Path.GetFileNameWithoutExtension(path).StartsWith("[]"))
            if (!Path.GetFileNameWithoutExtension(path).StartsWith("["))
            {
                Tool.MoveFile("unknown", path);
                return(resList);
            }

            //string value = idRegex.Match(content).Value;
            //if (!String.IsNullOrEmpty(value))
            //{
            //    string torernt = idRegex.Match(content).Value.Split(new string[] { "target=\"_blank\"", "</a>" }, StringSplitOptions.RemoveEmptyEntries)[1];
            //    string id = idRegex1.Match(torernt.ToUpper().Replace("-", "")).Value;
            //    his.Vid = id;

            //}
            string[] strs = Path.GetFileNameWithoutExtension(path).Replace("[]", "").Split(new string[] { "[", "]" }, StringSplitOptions.None);
            if (strs.Length >= 2)
            {
                his.Vid = strs[1];
            }
            if (String.IsNullOrEmpty(his.Vid))
            {
                Tool.MoveFile("unknown", path);
                return(resList);
            }

            MatchCollection mc = picRegex.Matches(content);

            foreach (Match m in mc)
            {
                // zoomfile="./data/attachment/forum/201803/04/225623iycsyb3petgs9z7j.jpg"
                string picUrl = "https://youiv.tv" + m.Value.Replace("zoomfile=\".", "").Replace("\"", "");
                his.Html = "<img src=\"" + picUrl + "\"/><br>";
            }
            if (content.Contains("filter=typeid&amp;typeid=432\">[U-15写真]</a>"))
            {
                Tool.MoveFile("U-15", path);
                his.IsBlack = true;
                resList.Add(his);
                return(resList);
            }
            his.HisTimeSpan    = 999;
            his.IsCHeckHisSize = ifCheckHis;
            his.Name           = path.Split(new char[] { ']', '.' })[1];
            resList.Add(his);
            return(resList);
        }
예제 #10
0
        public ArrayList alys(string content, string path)
        {
            ArrayList resList = new ArrayList();

            string[] contents = content.Split(new string[] { "bevel clear" }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string s in contents)
            {
                if (!s.Contains("left center mgb10 desc radius"))
                {
                    continue;
                }
                His his = new His();
                his.OriginalHtml = s;
                string   info  = r.Match(s).Value;
                string[] infos = info.Split(new string[] { "<h1>", "<br/>", "</h1>", "," }, StringSplitOptions.RemoveEmptyEntries);
                // his.Actress=infos[1];
                //  string[] infos1=infos[2].Split(',');
                string size = infos[2].Trim();
                his.Vid = infos[0].Trim();
                //if (his.Vid.Split('-').Length > 2)
                //{
                //    his.Vid = his.Vid.Substring(0, his.Vid.LastIndexOf('-'));
                //}
                his.Vid = his.Vid.Replace("-", "");
                string sizeDigit = size.Replace("Size:", "").Replace(".<br />", "").Replace("<br />", "");
                try
                {
                    if (sizeDigit.EndsWith("GB"))
                    {
                        sizeDigit = sizeDigit.Replace("GB", "");
                        his.Size  = Convert.ToDouble(sizeDigit) * 1024;
                    }
                    else
                    {
                        his.Size = Convert.ToDouble(sizeDigit.Replace("MB", "").Replace("KB", ""));
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine("CAN NOT FIND SIZE!!");
                    Console.WriteLine(e.Message);
                }

                getHtml(his, size);
                resList.Add(his);
            }
            return(resList);
        }
예제 #11
0
        void getHtml(His his, string size)
        {
            string imgUrl = "http://www.141jav.com/movies/" + imageRex.Match(his.OriginalHtml).Value.Replace("movies/", "");

            his.Html = "<img src=\"" + imgUrl + "\"/><br>" + "<a href=\"https://www.google.com.tw/search?um=1&newwindow=1&safe=off&hl=zh-CN&biw=1362&bih=839&dpr=1&ie=UTF-8&tbm=isch&source=og&sa=N&tab=wi&ei=QKr6U8KMKtOWaqbigogK&q=" + his.Vid + "\"/>" + his.Vid + "</a>" + "<br>" + size + "<br>" + "<br>" + his.Actress + "<br>\r\n";
            string[] searchStr = Tool.getId(his.Vid.ToLower());
            //https://torrentproject.se/?t=XRW+017
            his.Html += "<a href=\"https://torrentproject.se/?t=" + searchStr[0] + "+" + searchStr[1] + "\"/>" + his.Vid + "</a><br>\r\n";
            MatchCollection mc = rLink.Matches(his.OriginalHtml);

            foreach (Match m in mc)
            {
                his.Html += "<a href=\"http://www.141jav.com/" + m.Value + ">torrage</a><br>\r\n";
            }
            his.Html += "<a href=\"" + megRegex.Match(his.OriginalHtml).Value + ">Open</a><br>\r\n";
        }
예제 #12
0
        public override System.Collections.ArrayList alys(string content, string path, string vid, bool ifCheckHis)
        {
            ArrayList resList = new ArrayList();

            try
            {
                if (path.Contains("httpjavtorrent"))
                {
                    return(resList);
                }
                His his = new His();
                //<img src="//jtl.re/x/18/docp021.jpg" class="s-full">
                string imgUrl = "http:" + imgRegex.Match(content).Value.Replace("<img src=\"", "").Replace("\" class=\"s-full\">", "");

                his.Vid = Path.GetFileNameWithoutExtension(path.ToUpper()).Split(new string[] { "[", "]" }, StringSplitOptions.RemoveEmptyEntries)[0];
                MatchCollection sizeMc = sizeRegex.Matches(content);
                double          size   = 0;
                foreach (Match match in sizeMc)
                {
                    //class="dl-link DL" target="_blank">DL - 881.8 MB</a>
                    //class="dl-link HD" target="_blank">HD - 3.49 GB</a>

                    string sizeString = match.Value.Replace("class=\"dl-link DL\" target=\"_blank\">DL - ", "").Replace("class=\"dl-link HD\" target=\"_blank\">HD - ", "");
                    if (sizeString.Contains("MB"))
                    {
                        size = Convert.ToDouble(sizeString.Replace("MB</a>", "").Trim());
                    }
                    else
                    {
                        size = Convert.ToDouble(sizeString.Replace("GB</a>", "").Trim()) * 1024;
                    }
                }
                his.Size           = size;
                his.HisTimeSpan    = 999;
                his.Html           = "<img src=\"" + imgUrl + "\"/><br>";
                his.IsCHeckHisSize = ifCheckHis;
                his.Name           = path.Split(new char[] { ']', '.' })[1];
                resList.Add(his);
            } catch (Exception e)
            {
                Tool.MoveFile("error", path);
                Console.WriteLine("error  " + path);
            }
            return(resList);
        }
예제 #13
0
        //http://www.141jav.com/movies/MILD833.jpg
        public ArrayList alys(string content, string path)
        {
            ArrayList resList = new ArrayList();

            string[] contents = content.Split(new string[] { "<h3><p>" }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string s in contents)
            {
                if (!s.Contains("artist-container"))
                {
                    continue;
                }
                His his = new His();
                his.OriginalHtml = s;
                his.Vid          = r.Match(s).Value.Replace("<br />VID:", "").Trim();
                //if (his.Vid.Split('-').Length > 2)
                //{
                //    his.Vid = his.Vid.Substring(0, his.Vid.LastIndexOf('-'));
                //}
                his.Vid = his.Vid.Replace("-", "");
                string size      = sizeRegex.Match(s).Value.Replace("<br />Size:", "").Trim();
                string sizeDigit = size.Replace("Size:", "").Replace(".<br />", "").Replace("<br />", "");
                try
                {
                    if (sizeDigit.EndsWith("GB"))
                    {
                        sizeDigit = sizeDigit.Replace("GB", "");
                        his.Size  = Convert.ToDouble(sizeDigit) * 1024;
                    }
                    else
                    {
                        his.Size = Convert.ToDouble(sizeDigit.Replace("MB", "").Replace("KB", ""));
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine("CAN NOT FIND SIZE!!");
                    Console.WriteLine(e.Message);
                }
                his.Actress = actressRegex.Match(s).Value.Replace("<br />Actress: ", "").Replace("</p>", "");
                getHtml(his, size);
                resList.Add(his);
            }
            return(resList);
        }
예제 #14
0
        //http://www.141jav.com/movies/MILD833.jpg
        public ArrayList alys(string content, string path, string _141javVid)
        {
            ArrayList resList = new ArrayList();

            string[] htmls = content.Split(new string[] { "<h3><p>" }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string s in htmls)
            {
                His his = new His();
                his.HisTimeSpan  = 12;
                his.OriginalHtml = s;
                his.Vid          = r.Match(s).Value.Replace("<br />VID:", "").Trim();
                if (_141javVid.ToLower() != his.Vid.ToLower())
                {
                    continue;
                }
                his.Vid = his.Vid.Replace("-", "");
                string size      = sizeRegex.Match(s).Value.Replace("<br />Size:", "").Trim();
                string sizeDigit = size.Replace("Size:", "").Replace(".<br />", "").Replace("<br />", "");
                try
                {
                    if (sizeDigit.EndsWith("GB"))
                    {
                        sizeDigit = sizeDigit.Replace("GB", "");
                        his.Size  = Convert.ToDouble(sizeDigit) * 1024;
                    }
                    else
                    {
                        his.Size = Convert.ToDouble(sizeDigit.Replace("MB", "").Replace("KB", ""));
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine("CAN NOT FIND SIZE!!");
                    Console.WriteLine(e.Message);
                }
                his.Actress = actressRegex.Match(s).Value.Replace("<br />Actress: ", "").Replace("</p>", "");
                getHtml(his, size);
                resList.Add(his);
            }

            return(resList);
        }
예제 #15
0
        public ArrayList alys(string content, string path, string vid)
        {
            ArrayList resList = new ArrayList();

            content = content.Replace("<b>", "").Replace("</b>", "");
            string[] contents = content.Split(new string[] { "class=\"idx\"" }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string s in contents)
            {
                His his = new His();
                his.OriginalHtml = s;
                if (s.Contains("DOCTYPE HTML PUBLIC"))
                {
                    continue;
                }
                his.Vid = s.Split(new string[] { "\">", "</a></td></tr></tbody></table><table class=" }, StringSplitOptions.RemoveEmptyEntries)[3];

                MatchCollection match = r.Matches(his.Vid.ToLower());
                if (match.Count != 1)
                {
                    invalid += his.OriginalHtml + "/r/n";
                    continue;
                }
                his.Vid = match[0].Value.Replace(" ", "").Replace("-", "").Replace("_", "");

                MatchCollection sizeMatch = sizeRegexGB.Matches(his.OriginalHtml);
                if (sizeMatch.Count > 0)
                {
                    his.Size = Convert.ToDouble(sizeMatch[0].Value.Replace("&nbsp;GB</span>", "").Replace("大小:</span><span class=\"attr_val\">", "")) * 1024;
                }
                if (sizeMatch.Count == 0)
                {
                    sizeMatch = sizeRegexMB.Matches(his.OriginalHtml);
                    his.Size  = Convert.ToDouble(sizeMatch[0].Value.Replace("&nbsp;MB</span>", "").Replace("大小:</span><span class=\"attr_val\">", ""));
                }
                getHtml(his, his.Size.ToString());
                resList.Add(his);
            }
            Tool.WriteFile(path, invalid);
            return(resList);
        }
예제 #16
0
 public bool CheckBlackList(His his)
 {
     return(DBHelper.getBlackListHis(his) > 0);
 }
예제 #17
0
        public override ArrayList alys(string content, string path, string vid, bool isCheckHis)
        {
            ArrayList resList = new ArrayList();

            try
            {
                MatchCollection mc    = idRegex.Matches(Path.GetFileNameWithoutExtension(path.ToUpper()).Replace("S1", ""));
                bool            hasS1 = false;
                //foreach(Match m in mc)
                //{
                //    if (m.Value == "S1")
                //        hasS1 = true;
                //}
                //if (mc.Count >2||mc.Count==2&&!hasS1)
                //{
                //    String unknownPath = Path.Combine(Path.GetDirectoryName(path), "sisUnknown");
                //    if (!Directory.Exists(unknownPath))
                //        Directory.CreateDirectory(unknownPath);
                //    File.Move(path, Path.Combine(unknownPath, Path.GetFileNameWithoutExtension(path)) + ".htm");
                //    return resList;
                //}

                string idLetter = "";
                string idNumber = "";
                foreach (Match m in mc)
                {
                    string id            = m.Value.Replace("-", "").ToLower().Replace("‐", "");
                    string letter        = "";
                    string number        = "";
                    bool   isEndofLetter = false;
                    for (int i = 0; i < id.Length; i++)
                    {
                        if (reg1.IsMatch(id[i].ToString()))
                        {
                            if (isEndofLetter)
                            {
                                break;
                            }
                            else
                            {
                                letter += id[i];
                            }
                        }
                        else
                        {
                            number       += id[i];
                            isEndofLetter = true;
                        }
                    }
                    if (number.Length > 1 && letter.Length > 1)
                    {
                        if (letter.Length > idLetter.Length)
                        {
                            idLetter = letter;
                            idNumber = number;
                        }
                        else if (letter.Length == idLetter.Length && number.Length > idNumber.Length)
                        {
                            idLetter = letter;
                            idNumber = number;
                        }
                    }
                }
                string id1 = idLetter + idNumber;
                if (String.IsNullOrEmpty(id1))
                {
                    String unknownPath = Path.Combine(Path.GetDirectoryName(path), "sisUnknown");
                    if (!Directory.Exists(unknownPath))
                    {
                        Directory.CreateDirectory(unknownPath);
                    }
                    File.Move(path, Path.Combine(unknownPath, Path.GetFileNameWithoutExtension(path)) + ".htm");
                    return(resList);
                }
                His his = new His();
                his.Vid  = id1;
                his.Size = Convert.ToDouble(sizeRegex.Match(path).Value.Replace("size^^^", "").Replace(".htm", ""));
                his.Html = content.Split(new string[] { "count_add_one", "下载次数:" }, StringSplitOptions.RemoveEmptyEntries)[1];
                his.Name = Path.GetFileNameWithoutExtension(path.ToUpper()).Split(new string[] { "SIZE^^^" }, StringSplitOptions.RemoveEmptyEntries)[0];
                //if(his.Name.StartsWith("[FHD"))
                //{
                //    his.FailReason = "44x";
                //}
                string torrentLink = "http://sis001.com/bbs/" + torrentLinkRegex.Match(his.Html).Value;

                MatchCollection imgMc = imgRegex.Matches(his.Html);
                his.Html = "";
                foreach (Match match in imgMc)
                {
                    if (!match.Value.Contains("torrent.gif"))
                    {
                        his.Html += "<a href=\"" + torrentLink + "\">" + match.Value + "/></a><br>";
                    }
                }
                his.HisTimeSpan    = 100;
                his.IsCHeckHisSize = isCheckHis;
                resList.Add(his);
            }
            catch (Exception e)
            {
                String unknownPath = Path.Combine(Path.GetDirectoryName(path), "sisUnknown");
                if (!Directory.Exists(unknownPath))
                {
                    Directory.CreateDirectory(unknownPath);
                }
                File.Move(path, Path.Combine(unknownPath, Path.GetFileNameWithoutExtension(path)) + ".htm");
            }
            return(resList);
        }
예제 #18
0
        public override ArrayList alys(string content, string path, string vid, bool isCheckHis)
        {
            His       his     = new His();
            ArrayList resList = new ArrayList();

            try
            {
                MatchCollection mc = idRegex.Matches(Path.GetFileNameWithoutExtension(path.ToUpper()));
                if (mc.Count == 0)
                {
                    mc = idRegex1.Matches(Path.GetFileNameWithoutExtension(path.ToUpper()));
                    string id            = mc[0].Value;
                    string letter        = "";
                    string number        = "";
                    bool   isEndofLetter = false;
                    for (int i = 0; i < id.Length; i++)                        //修改   对于出现KIDM235A  KIDM235B
                    {
                        if (reg1.IsMatch(id[i].ToString()))
                        {
                            if (isEndofLetter)
                            {
                                break;
                            }
                            else
                            {
                                letter += id[i];
                            }
                        }
                        else
                        {
                            number       += id[i];
                            isEndofLetter = true;
                        }
                    }

                    if (number.StartsWith("00"))
                    {
                        number = number.Substring(2);
                    }
                    his.Vid = letter + number;
                }
                else
                {
                    his.Vid = mc[0].Value.Replace("-", "");
                }
                if (mc.Count != 1)
                {
                    String unknownPath = Path.Combine(Path.GetDirectoryName(path), "huaSeUnknown");
                    if (!Directory.Exists(unknownPath))
                    {
                        Directory.CreateDirectory(unknownPath);
                    }
                    File.Move(path, Path.Combine(unknownPath, Path.GetFileNameWithoutExtension(path)) + ".htm");
                    return(resList);
                }

                his.Name = Path.GetFileNameWithoutExtension(path.ToUpper()).Replace(mc[0].Value, "");

                string sizeStr = sizeRegex.Match(content).Value.Replace("容量", "").Replace("</font>", "").Replace("<", "").Replace(":", "").Replace(":", "");
                if (sizeStr.ToUpper().Contains("G"))
                {
                    sizeStr  = sizeStr.ToUpper().Replace("GB", "");
                    his.Size = Convert.ToDouble(sizeStr) * 1024;
                }
                else
                {
                    sizeStr  = sizeStr.ToUpper().Replace("MB", "");
                    his.Size = Convert.ToDouble(sizeStr);
                }
                MatchCollection matchCollection = torrentRegex.Matches(content);
                string          torrentLink;

                torrentLink = "http://dsdjssel.com/" + matchCollection[matchCollection.Count - 1];


                MatchCollection picMc = picRegex.Matches(content);
                foreach (Match m in picMc)
                {
                    his.Html += "<a href=\"" + torrentLink + "><img src=\"" + m.Value.Replace("file=\"", "") + " /></a><br>";
                }

                his.HisTimeSpan    = 10;
                his.IsCHeckHisSize = isCheckHis;
                resList.Add(his);
            }
            catch
            {
                String unknownPath = Path.Combine(Path.GetDirectoryName(path), "168xUnknown");
                if (!Directory.Exists(unknownPath))
                {
                    Directory.CreateDirectory(unknownPath);
                }
                File.Move(path, Path.Combine(unknownPath, Path.GetFileNameWithoutExtension(path)) + ".htm");
            }
            return(resList);
        }
예제 #19
0
        public bool checkValid(His his)
        {
            if (!String.IsNullOrEmpty(his.FailReason))
            {
                return(false);
            }
            string id = his.Vid;

            if (id == null || id == "")
            {
                return(true);
            }
            id = id.ToLower();
            bool flag = true;

            if (Tool.IsNum(id))
            {
                foreach (MyFileInfo info in list)
                {
                    if (info.FileName.Contains(id) || info.Directory.Contains(id))
                    {
                        flag = false;
                        break;
                    }
                }
            }
            else
            {
                id = reg2.Match(id).Value;
                string letter        = "";
                string number        = "";
                bool   isEndofLetter = false;
                for (int i = 0; i < id.Length; i++)                        //修改   对于出现KIDM235A  KIDM235B
                {
                    if (reg1.IsMatch(id[i].ToString()))
                    {
                        if (isEndofLetter)
                        {
                            break;
                        }
                        else
                        {
                            letter += id[i];
                        }
                    }
                    else
                    {
                        number       += id[i];
                        isEndofLetter = true;
                    }
                }

                string[] searchStr = { letter, number };


                Regex r = new Regex("[^a-z]" + searchStr[0] + @"(\s){0,3}[-_]?(\s){0,3}(0){0,3}" + searchStr[1] + "[^0-9]|^" + searchStr[0] + @"(\s){0,3}[-_]?(\s){0,3}(0){0,3}" + searchStr[1] + "$|[^a-z]" + searchStr[0] + @"(\s){0,3}[-_]?(\s){0,3}(0){0,3}" + searchStr[1] + "$|^" + searchStr[0] + @"(\s){0,3}[-_]?(\s){0,3}(0){0,3}" + searchStr[1] + "[^0-9]");
                for (int i = 0; i < list.Count; i++)
                {
                    flag = true;

                    string fileName      = Path.GetFileNameWithoutExtension(list[i].FileName.ToLower()).Replace("_", "-");
                    string directoryName = list[i].Directory.ToLower();
                    string extension     = list[i].Extension;
                    double len           = list[i].Length;
                    if (Config.isCheckSize)
                    {
                        if ((r.IsMatch(fileName) || r.IsMatch(directoryName)) && !fileName.Contains("incomplete"))
                        {
                            his.IfExistSmaller = true;
                            if ((len * 1.7 > his.Size ||
                                 (extension.ToLower() == ".mds" || extension.ToLower() == ".iso") && his.Size < 3000))
                            {
                                flag = false;
                                break;
                            }
                        }
                    }
                    else
                    {
                        if ((r.IsMatch(fileName) || r.IsMatch(directoryName)) && !fileName.Contains("incomplete"))
                        {
                            flag = false;
                            break;
                        }
                    }
                }
                if (!flag)
                {
                    his.FailReason = "file";
                }
            }

            if (flag)
            {
                if (!his.IfExistSmaller)  //如果有小文件 说明要下载
                {
                    flag = checkHis(his);
                    if (!flag)
                    {
                        his.FailReason = "his";
                    }
                }
            }



            if (flag)
            {
                DBHelper.insertHis(his);
            }

            return(flag);
        }
예제 #20
0
        public override ArrayList alys(string content, string path, string vid, bool isCheckHis)
        {
            ArrayList resList = new ArrayList();

            try
            {
                MatchCollection mc = idRegex.Matches(Path.GetFileNameWithoutExtension(path.ToUpper()));
                if (path.EndsWith(".htm.htm"))
                {
                    return(resList);
                }
                if (mc.Count != 1)
                {
                    String unknownPath = Path.Combine(Path.GetDirectoryName(path), "thzUnknown");
                    if (!Directory.Exists(unknownPath))
                    {
                        Directory.CreateDirectory(unknownPath);
                    }
                    File.Move(path, Path.Combine(unknownPath, Path.GetFileNameWithoutExtension(path)) + ".htm");
                    return(resList);
                }
                His his = new His();
                his.Vid = mc[0].Value.Replace("-", "");
                string name = path.Split(new char[] { ']', '.' })[1];
                his.Name = name;
                try
                {
                    string sizeStr = sizeRegex.Match(content).Value.Replace("容量:", "").Replace("<", "");
                    if (sizeStr.ToUpper().Contains("G"))
                    {
                        sizeStr  = sizeStr.ToUpper().Replace("GB", "");
                        his.Size = Convert.ToDouble(sizeStr) * 1024;
                    }
                    else
                    {
                        sizeStr  = sizeStr.ToUpper().Replace("MB", "");
                        his.Size = Convert.ToDouble(sizeStr);
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine("Size Error " + e.Message);
                }
                StreamReader sr       = new StreamReader(path + ".htm");
                string       content1 = sr.ReadToEnd();
                sr.Close();
                string torrentLink = "http://taohuabt.info/forum.php?" + torrentLinkRegex.Match(content1).Value;
                content = content.Split(new string[] { "alt=\"发新帖\"" }, StringSplitOptions.RemoveEmptyEntries)[1];
                MatchCollection imgMc = imgRegex.Matches(content);
                int             n     = 0;
                foreach (Match match in imgMc)
                {
                    if (!match.Value.Contains("middle"))
                    {
                        if (n == 0)
                        {
                            his.Html += "<a href=\"" + torrentLink + "\"><img src=\"" + match.Value + "\"/></a><br>";
                        }
                        else
                        {
                            his.Html += "<a href=\"" + torrentLink + "\"><img src=\"" + match.Value + "\" width=\"40%\"/></a><br>";
                        }
                        n++;
                    }
                }
                his.Html           = his.Html.Replace("onclick=\"", "");
                his.HisTimeSpan    = 10;
                his.IsCHeckHisSize = isCheckHis;
                resList.Add(his);
            }
            catch (Exception e)
            {
                String unknownPath = Path.Combine(Path.GetDirectoryName(path), "thzUnknown");
                if (!Directory.Exists(unknownPath))
                {
                    Directory.CreateDirectory(unknownPath);
                }
                File.Move(path, Path.Combine(unknownPath, Path.GetFileNameWithoutExtension(path)) + ".htm");
            }
            return(resList);
        }
예제 #21
0
        public override ArrayList alys(string content, string path, string vid, bool ifCheckHis)
        {
            ArrayList resList = new ArrayList();

            try
            {
                string fileName = Path.GetFileNameWithoutExtension(path.ToUpper());
                string sizeStr;
                //if (fileName.StartsWith("[FHD"))
                //{
                //    sizeStr = sizeRegex1.Match(fileName).Value.Replace("[FHD","").Replace("]","");
                //    fileName = fileName.Substring(4);


                //}
                //else
                {
                    //容量:</div></td><td>812.71 MB</td></tr><tr><td><div
                    sizeStr = sizeRegex.Match(content).Value.Replace("容量:</div></td><td>", "").Replace("容量:", "").Replace(" ", "");
                }
                MatchCollection mc = idRegex.Matches(fileName);
                if (mc.Count != 1)
                {
                    String unknownPath = Path.Combine(Path.GetDirectoryName(path), "BailuUnknown");
                    if (!Directory.Exists(unknownPath))
                    {
                        Directory.CreateDirectory(unknownPath);
                    }
                    File.Move(path, Path.Combine(unknownPath, Path.GetFileNameWithoutExtension(path)) + ".htm");
                    return(resList);
                }
                His his = new His();
                his.Vid  = mc[0].Value.Replace("-", "");
                his.Name = Path.GetFileNameWithoutExtension(path.ToUpper());
                if (sizeStr.ToUpper().Contains("G"))
                {
                    sizeStr  = sizeStr.ToUpper().Replace("GB", "");
                    his.Size = Convert.ToDouble(sizeStr) * 1024;
                }
                else
                {
                    sizeStr  = sizeStr.ToUpper().Replace("MB", "");
                    his.Size = Convert.ToDouble(sizeStr);
                }
                string          torrentLink;
                MatchCollection matchCollection = torrentRegex.Matches(content);
                if (matchCollection.Count > 1)
                {
                    torrentLink = "http://www.100aa.pw/" + matchCollection[1].Value.Replace("amp;", "").Replace("\"", "");
                    his.Html    = "<a href=\"" + torrentLink + "\"><img src=\"" + "http://www.100aa.pw/" + matchCollection[0].Value.Replace("amp;", "") + "/></a><br>";
                }
                else
                {
                    torrentLink = "http://www.100aa.pw/" + matchCollection[0].Value.Replace("amp;", "").Replace("\"", "");
                }

                MatchCollection picMc = picRegex.Matches(content);

                foreach (Match m in picMc)
                {
                    his.Html += "<a href=\"" + torrentLink + "\"><img " + m.Value + "/></a><br>";
                }

                his.HisTimeSpan    = 1000;
                his.IsCHeckHisSize = ifCheckHis;
                resList.Add(his);
            }
            catch
            {
                String unknownPath = Path.Combine(Path.GetDirectoryName(path), "BailuUnknown");
                if (!Directory.Exists(unknownPath))
                {
                    Directory.CreateDirectory(unknownPath);
                }
                File.Move(path, Path.Combine(unknownPath, Path.GetFileNameWithoutExtension(path)) + ".htm");
            }
            return(resList);
        }
예제 #22
0
        public ArrayList alys(string content)
        {
            string    partTorrentUrl = findKey(content);
            ArrayList list           = new ArrayList();

            if (content.Contains("Sorry, but you are looking for something that isn't here."))
            {
                Console.WriteLine(" NOT FOUND");
                return(list);
            }
            string[] content1 = content.Split(new string[] { "<div class=\"image\">" }, StringSplitOptions.RemoveEmptyEntries);

            for (int i = 0; i < content1.Length; i++)
            {
                if (content1[i].Contains("OLink('&#") || content1[i].Contains("OLink(&#"))
                {
                    His his = new His();
                    his.OriginalHtml = content1[i];
                    string s   = content1[i].Split(new string[] { "<script>document.write(jj(\"", "\"))</script>" }, StringSplitOptions.RemoveEmptyEntries)[1];
                    string res = "";//engine.CallGlobalFunction<string>("jj", s);
                    res = res.Replace(">", "/>");

                    MatchCollection mc = r1.Matches(res);
                    foreach (Match m in mc)
                    {
                        XmlDocument xmlDoc = new XmlDocument();
                        xmlDoc.LoadXml(m.ToString());
                        string key = xmlDoc.GetElementsByTagName("img")[0].Attributes["style"].Value;
                        key = key.Substring(0, key.IndexOf(";"));
                        string cha = dictionary[key];
                        res = res.Replace(m.ToString(), cha);
                    }

                    his.Info = res;
                    try
                    {
                        try
                        {
                            his.Vid = r2.Matches(res)[0].ToString().Split(new string[] { "Vídeo Id: ", "<br/>" }, StringSplitOptions.RemoveEmptyEntries)[0];
                        }
                        catch (Exception e)
                        {
                            Console.WriteLine("VID NOT FOUND!!");
                            Console.WriteLine(e.Message);
                        }
                        string size = res.Split(new string[] { "<br/>Sìze: ", "<br/><u/>" }, StringSplitOptions.RemoveEmptyEntries)[1];
                        if (size.EndsWith("GB"))
                        {
                            size     = size.Replace("Size:", "").Replace("GB", "");
                            his.Size = Convert.ToDouble(size) * 1024;
                        }
                        else
                        {
                            his.Size = Convert.ToDouble(size.Replace("MB", "").Replace("KB", ""));
                        }
                        his.Actress   = res.Split(new string[] { "<br/>" }, StringSplitOptions.RemoveEmptyEntries)[0];
                        his.FileCount = Convert.ToInt32(res.Split(new string[] { "Fíles in tørrent:</u/>", "fìles<br/>" }, StringSplitOptions.RemoveEmptyEntries)[1]);
                        try
                        {
                            his.Files = res.Split(new string[] { "fìles<br/>" }, StringSplitOptions.RemoveEmptyEntries)[1];
                        }
                        catch
                        {
                            Console.WriteLine("NO FILE LIST");
                        }
                        his.Html = getImg(his, partTorrentUrl);
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e.StackTrace);
                        Console.WriteLine(res);
                    }
                    list.Add(his);
                }
            }
            return(list);
        }
예제 #23
0
 void getHtml(His his, string size)
 {
     his.Html = his.OriginalHtml;
 }
예제 #24
0
        public override ArrayList alys(string content, string path, string vid, bool isCheckHis)
        {
            ArrayList resList = new ArrayList();

            if (!path.EndsWith("htm"))
            {
                return(resList);
            }

            MatchCollection mc = idRegex.Matches(RemoveExtension(Path.GetFileNameWithoutExtension(path)));

            if (mc.Count != 1)
            {
                String unknownPath = Path.Combine(Path.GetDirectoryName(path), "AkibaOnlineUnknown");
                if (!Directory.Exists(unknownPath))
                {
                    Directory.CreateDirectory(unknownPath);
                }
                File.Move(path, Path.Combine(unknownPath, Path.GetFileNameWithoutExtension(path)) + ".htm");
                return(resList);
            }
            His his = new His();

            his.HtmPath     = path;
            his.Vid         = mc[0].Value.Replace("-", "");
            his.HisTimeSpan = 48;
            string directory = Path.GetDirectoryName(path);

            String[] torrentPaths = Directory.GetFiles(directory, "*", SearchOption.TopDirectoryOnly);

            foreach (string torrentPath in torrentPaths)
            {
                if (torrentPath.EndsWith(".torrent") && torrentPath.Contains(Path.GetFileNameWithoutExtension(path)))
                {
                    float size = GetTorrentSize(torrentPath);
                    if (size > his.Size)
                    {
                        his.TorrentPath = torrentPath;
                        his.Size        = size;
                    }
                }
            }
            his.Html = "<div class=\"messageContent\">" + content.Split(new string[] { "class=\"messageContent\">", "class=\"messageMeta ToggleTriggerAnchor\">" }, StringSplitOptions.RemoveEmptyEntries)[1] + "<br>\n";
            MatchCollection srcMC = srcRegex.Matches(his.Html);

            foreach (Match match in srcMC)
            {
                if (!match.Value.StartsWith("src=\"http"))
                {
                    his.Html = his.Html.Replace(match.Value, match.Value.Replace("src=\"", "src=\"https://www.akiba-online.com/"));
                }
            }
            MatchCollection hrefMC = hrefRegex.Matches(his.Html);

            foreach (Match match in hrefMC)
            {
                if (!match.Value.StartsWith("href=\"http"))
                {
                    his.Html = his.Html.Replace(match.Value, match.Value.Replace("href=\"", "href=\"https://www.akiba-online.com/"));
                }
            }
            his.IsCHeckHisSize = isCheckHis;
            resList.Add(his);
            return(resList);
        }
예제 #25
0
        public static string getSearchHtml(string vid, double size, string name, bool getKiki, His his)
        {
            vid = vid.Replace("-", "").ToUpper();
            string html          = "";
            string letter        = "";
            string number        = "";
            bool   isEndofLetter = false;

            foreach (char c in vid)
            {
                if (reg1.IsMatch(c.ToString()))
                {
                    if (isEndofLetter)
                    {
                        break;
                    }
                    else
                    {
                        letter += c;
                    }
                }
                else
                {
                    number       += c;
                    isEndofLetter = true;
                }
            }
            //http://javscreens.com/d/div-235.html
            string[] idSplit = Tool.getId(vid.ToLower());

            //html += "<a href=\"http://javscreens.com/" + vid.ToLower()[0]+"/"+idSplit[0] +"-"+idSplit[1]+ ".html\"/>" + vid + "</a><br>";
            //http://video-jav.net/wp-content/uploads/NMK-030_Video-JAV.net_.mp4.scrlist.jpg
            html += "<a href=\"http://video-jav.net/wp-content/uploads/" + idSplit[0].ToUpper() + "-" + idSplit[1] + "_Video-JAV.net_.mp4.scrlist.jpg\"/>" + vid + "</a><br>";
            html += "<a href=\"https://www.google.com.tw/search?um=1&newwindow=1&safe=off&hl=zh-CN&biw=1362&bih=839&dpr=1&ie=UTF-8&tbm=isch&source=og&sa=N&tab=wi&ei=QKr6U8KMKtOWaqbigogK&q=" + vid + "\"/>" + vid + "</a><br>";
            if (!string.IsNullOrEmpty(name))
            {
                html += "<a href=\"https://www.google.com.tw/search?as_st=y&tbm=isch&hl=zh-CN&as_q=" + name + "&as_epq=&as_oq=&as_eq=&cr=&as_sitesearch=&safe=images&tbs=iar:t#imgrc=l5VFSis1_tEGOM:\"/>" + name + "</a><br>";
            }
            // html += "<a href=\"https://www.google.com.tw/search?um=1&newwindow=1&safe=off&hl=zh-CN&biw=1362&bih=839&dpr=1&ie=UTF-8&tbm=isch&source=og&sa=N&tab=wi&ei=QKr6U8KMKtOWaqbigogK&q=" + name + "\"/>" + name + "</a><br>";
            html += size + "<br>";
            html += "<a href=\"http://www.btanx.com/search/" + letter + "%20" + number + "-size-desc-1\"/>" + vid + "</a><br>\n";
            html += "<a href=\"http://www.javbus.com/" + letter + "-" + number + "\">" + vid + "</a><br>\n";
            if (getKiki)
            {
                html += "<a href=\"" + KikiBt(letter + " " + number) + "\"/>" + vid + "</a><br>\n";
            }
            if (his.IfExistSmaller)
            {
                html += "ExistSmaller<br>\n";
            }
            html += ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><br>\n";
            return(html);
        }