Пример #1
0
        public void springer(object obiekty)
        {
            var    obiektyarray = (object[])obiekty;
            string search       = obiektyarray[0].ToString();
            var    datafr       = (int)obiektyarray[1];
            var    datato       = (int)obiektyarray[2];

            DownF("Springer", search + ".csv", "http://link.springer.com/search/csv?query=" + search);
            OrderedDictionary data = CSVtoListPar.Parser("Springer", search + ".csv");
            var structspri         = new StructSpringer();

            structspri.Dodawanie(data, datafr, datato);
            _listspringer = structspri.StrSpri;
            File.DeleteFile("Springer", search + ".csv");
            //File.SaveFile("Springer", search + ".bib", ListtoString.Parser(data));
            BazyTh.Endthread(3);
        }
Пример #2
0
        public void ieee(object obiekty)
        {
            var             obiektyarray = (object[])obiekty;
            string          search       = obiektyarray[0].ToString();
            var             datafr       = (int)obiektyarray[1];
            var             datato       = (int)obiektyarray[2];
            CookieContainer tmpcook;
            string          filedata = "bulkSetSize=1000%26queryText%253D" + search;
            var             templist = new List <object>();

            templist = GET("http://ieeexplore.ieee.org/Xplore/home.jsp");
            tmpcook  = (CookieContainer)templist[1];
            Console.WriteLine("Pobieram plik");
            File.SaveFile("IEEE", search + "tmp.csv",
                          POST("http://ieeexplore.ieee.org/search/searchExport.jsp", filedata, tmpcook));
            List <string> tmpCSV = File.OpenFile("IEEE", search + "tmp.csv");

            tmpCSV.RemoveAt(0);
            var tmp = new StringBuilder();

            foreach (string element in tmpCSV)
            {
                tmp.AppendLine(element);
            }
            File.DeleteFile("IEEE", search + "tmp.csv");
            File.SaveFile("IEEE", search + ".csv", tmp.ToString());
            OrderedDictionary data = CSVtoListPar.Parser("IEEE", search + ".csv");
            var structieee         = new StructIEEE();

            structieee.Dodawanie(data, datafr, datato);
            _listieee = structieee.StrIEEE;
            File.DeleteFile("IEEE", search + ".csv");
            //File.SaveFile("IEEE", search + ".bib", ListtoString.Parser(data));
            //File.DeleteFile("IEEE", search + ".csv");
            BazyTh.Endthread(4);
        }