Beispiel #1
0
        private void ProfileConfigFileInitialize(string filePath)
        {
            string line;
            int    counter = 0;

            List <ProfileConfigVO> profileConfigVOs = new List <ProfileConfigVO>();

            StreamReader file = new StreamReader(filePath, Encoding.Default, true);

            while (((line = file.ReadLine()) != null && !file.Equals("")))
            {
                ProfileConfigVO profileConfigVO = new ProfileConfigVO();

                string[] s = line.Split('\t');

                profileConfigVO.lastName  = s[0];
                profileConfigVO.firstName = s[1];
                profileConfigVO.nickName  = s[2];

                profileConfigVOs.Add(profileConfigVO);

                counter++;
            }

            file.Close();

            this.profileConfigVOs = profileConfigVOs;
        }
Beispiel #2
0
        private async Task ProfileModeProcessAsync()
        {
            await LoadPageAsync(browser, START_PAGE_URL);

            for (int i = 0; i < configVOs.Count; i++)
            {
                ConfigVO        configVO        = configVOs[i];
                ProfileConfigVO profileConfigVO = profileConfigVOs[i];

                // 프록시 서버 변경
                ChangeProxServer(configVO.ip);
                await Task.Delay(Int32.Parse((String)programConfig["prox-change-delay"]));

                // 로그인 처리
                await LoginYoutubeAsync(configVO.username, configVO.password, configVO.getMophnNo());

                // 설정으로 페이지로 이동
                await LoadPageAsync(browser, "https://aboutme.google.com/u/0/#name");

                // 설정 변경
                await ChangeYoutubeProfileAsync(profileConfigVO.lastName, profileConfigVO.firstName, profileConfigVO.nickName);

                // 쿠키 삭제
                DeleteCookie();
                await Task.Delay(Int32.Parse((String)programConfig["cookie-delete-delay"]));
            }
        }