static void Main()
 {
     if (TextTool.CountStringOccurrences(Filetest, "\\") >= 2)
     {
         //You have more than one folder
     }
     else
     {
         //One file no folder
     }
 }
Exemplo n.º 2
0
        public void run2()
        {
            // listBox4_blk.Items.Clear();

            // calcu get cost/size keyword | for example www.taiol.ir= 400
            //  textBox1.Text = key_web(AcquireHTML(textBox2.Text));
            for (int i = 0; i < listBox1.Items.Count; i++)
            {
                int keyword_firstpage = 0;
                int Feature_Url       = 0;

                txthtml = AcquireHTML(listBox1.Items[i].ToString());

                //بررسی وجود کلمات کلیدی تبلیغاتی در توضیحات وب سایت
                // c_k = info_link_count(key_web(txthtml));

                //بررسی وجود کلمات کلیدی در صفحه اول
                // c_k += info_link_count(txthtml);
                c_k = 0;

                // feature url
                //بررسی ویژگی های یو آر ال

                Feature_Url = info_link_url(listBox1.Items[i].ToString());

                // c_k= in_lik(txthtml).ToString();



                // calcu get cost/size description website | for example www.taiol.ir= 290

                // بررسی و محاسبه تعداد کلمات کلیدی در صفحه اول
                keyword_firstpage += TextTool.CountStringOccurrences(txthtml, "تبلیغات");
                keyword_firstpage += TextTool.CountStringOccurrences(txthtml, "آگهی");
                keyword_firstpage += TextTool.CountStringOccurrences(txthtml, "رایگان");
                keyword_firstpage += TextTool.CountStringOccurrences(txthtml, "تومان");
                keyword_firstpage += TextTool.CountStringOccurrences(txthtml, "خرید");
                keyword_firstpage += TextTool.CountStringOccurrences(txthtml, "درج آگهی");
                keyword_firstpage += TextTool.CountStringOccurrences(txthtml, "برنده");
                keyword_firstpage += TextTool.CountStringOccurrences(txthtml, " تبلیغات رایگان");
                keyword_firstpage += TextTool.CountStringOccurrences(txthtml, "فروش");
                keyword_firstpage += TextTool.CountStringOccurrences(txthtml, "ماهانه فقط");
                //j += TextTool.CountStringOccurrences(AcquireHTML(listBox1.Items[i].ToString()), "پردا");
                txthtml = "";



                // check is or is'nt website in blacklist | for example www.taiol.ir= false



                ///clacu get count of local link each link
                ///
                string g = "null";

                //  search2("site:" + listBox1.Items[i].ToString() + " " + "تومان + آگهی + تبلیغات + خرید", listBox1.Items[i].ToString() ,out g);

                link_count = g;



                //textBox8.Text += i + ":" + listBox1.Items[i].ToString() + ": " + keyword_firstpage + "-" + c_k + Environment.NewLine;

                //  listBox4.Items.Insert(i, j +" - "+ int.Parse(c_k) + " - " + link_count);


                // check in black list

                int blk = 0;


                blk = chech_blk_list(listBox1.Items[i].ToString());

                textBox6.Text += i + ":" + listBox1.Items[i].ToString() + " --->      keyword_firstpage:" + keyword_firstpage + " blk_list:" + blk + " Feature_Url:" + Feature_Url + Environment.NewLine;



                c_adv(keyword_firstpage, c_k, Feature_Url, i, listBox1.Items[i].ToString(), blk);

                //  j.ToString(), c_k.ToString(), link_count, link_feature

                // c_adv(c_k,j,i);

                //if (c_k > 70 & j > 30 || j > 70 & c_k > 30)
                //{

                //     listBox4.Items.Insert(i, listBox1.Items[i].ToString());
                // textBox8.Text += i + ":" + listBox1.Items[i].ToString() + ": " + j + "-" + c_k + Environment.NewLine;

                //   }

                // string blk = "0";
                //  insert_gt(i.ToString(), listBox1.Items[i].ToString(), keyword_firstpage.ToString(), "", Feature_Url,"");

                //   insert_gt(i.ToString(), listBox1.Items[i].ToString(), blk.ToString(), keyword_firstpage.ToString(),Feature_Url.ToString(),"0");


                // label1.Text = i2 + "";

                // c_k = 0;
            }
        }