Exemple #1
0
        public void StartInBoardProGetData()
        {
            try
            {
                if (IsStop_InBoardProGetDataThread)
                {
                    return;
                }

                lstInBoardProGetDataThraed.Add(Thread.CurrentThread);
                lstInBoardProGetDataThraed = lstInBoardProGetDataThraed.Distinct().ToList();
                Thread.CurrentThread.IsBackground = true;

                HttpHelper = new GlobusHttpHelper();
                LinkedInScrape objlinkscr = new LinkedInScrape();
                bool isLoggedIn = Login_InBoardProGetData();

                if (isLoggedIn)
                {
                    AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Start LinkedIn Crawling ]");
                    objlinkscr.StartInBoardProGetDataWithPagination(ref HttpHelper);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error >>> " + ex.StackTrace);
            }
            finally
            {
                try
                {
                    DisableEnableScrapperControls();

                    this.Invoke(new MethodInvoker(delegate
                    {
                        btnStopScraper.Enabled = true;
                        btnSearchScraper.Enabled = true;
                        btnSearchScraper.Cursor = Cursors.Default;
                    }));
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                }
            }
        }