예제 #1
0
파일: Form1.cs 프로젝트: ghkdwls30/Youtube
        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"]));
            }
        }
예제 #2
0
파일: Form1.cs 프로젝트: ghkdwls30/Youtube
        private async Task ChannelModeProcessAsync()
        {
            await LoadPageAsync(browser, START_PAGE_URL);

            for (int i = 0; i < configVOs.Count; i++)
            {
                ConfigVO        configVO  = configVOs[i];
                ChannelConfigVO channelVO = channelConfigVOs[i];

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

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

                // 채널 생성 루프
                foreach (string name in channelVO.list)
                {
                    // 채널 목록으로 이동
                    await LoadPageAsync(browser, "https://www.youtube.com/channel_switcher?feature=settings&next=%2Faccount");

                    // 채널 생성
                    await CreateChannel(name);
                }

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