You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Public Async Function EmptyPagesFactoryAsync(ByVal count As Integer) As Task(Of List(Of Page))
Dim Pages As List(Of Page) = New List(Of Page)
For i As Integer = 0 To count - 1
Try
ProxyCounter = (ProxyCounter + 1) Mod Proxys.Count
Dim Proxy = Proxys(ProxyCounter)
Dim ProxyURL = Proxy.Split("@")(1)
Dim Extra = New PuppeteerExtraSharp.PuppeteerExtra
Dim Browser = Await Extra.LaunchAsync(New PuppeteerSharp.LaunchOptions With {
.Headless = False,
.ExecutablePath = _config.GetSection("ChromePath").Value,
.Args = New String() {$"--proxy-server={ProxyURL}"}
})
Dim BrowserCredentials = New Credentials With {
.Username = Proxy.Split("@")(0).Split(":")(0),
.Password = Proxy.Split("@")(0).Split(":")(1)
}
Dim PageTask = Await Browser.NewPageAsync
Await PageTask.AuthenticateAsync(BrowserCredentials)
Dim cookies = JsonConvert.DeserializeObject(Of CookieParam)(File.ReadAllText("cookies.txt"))
Await PageTask.SetCookieAsync(cookies)
Pages.Add(PageTask)
Browsers.Add(Browser)
Catch ex As Exception
_log.LogCritical(ex.Message & vbCrLf & ex.StackTrace)
End Try
Next
Return Pages
End Function
Proxy file read correctly, I'm sure. And proxies list is workable, because I use the same list in my other project based on TheArtOfDev automation, this means url and login/pass is correct. Chrome path also setting correctly, parameter also setting correctly --proxy-server==xx.xx.xx.xx:yyy. There are no any exception, but maybe I doing something wrong, because I see only one blank Chrome page after line "Dim Browser", than program stopped and line "Dim BrowserCredentials" never working.
Where is my mistake?
Interesting, if I downgrade PuppeteerSharp from last version to 7.10 and PuppeteerExtraSharp to 1.3.2 I receive another error in class AsyncMethodBuilderCore
What does it mean?
The text was updated successfully, but these errors were encountered:
This is my page factory, I expect 25 empty tabs
Proxy file read correctly, I'm sure. And proxies list is workable, because I use the same list in my other project based on TheArtOfDev automation, this means url and login/pass is correct. Chrome path also setting correctly, parameter also setting correctly --proxy-server==xx.xx.xx.xx:yyy. There are no any exception, but maybe I doing something wrong, because I see only one blank Chrome page after line "Dim Browser", than program stopped and line "Dim BrowserCredentials" never working.
Where is my mistake?
Interesting, if I downgrade PuppeteerSharp from last version to 7.10 and PuppeteerExtraSharp to 1.3.2 I receive another error in class AsyncMethodBuilderCore
What does it mean?
The text was updated successfully, but these errors were encountered: