Watching stream video in a bot

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Onix
    Junior Member
    • Aug 2019
    • 13

    #1

    Watching stream video in a bot

    Hi,
    My customer would like to see in the bot on-line races on which he has placed bets

    How is that possible to make?
    Than you
  • WTPooh
    Member
    • May 2012
    • 88

    #2
    This is possible using Microsoft WebView2. You need to add cookie ssoid = yourSessionToken for videoplayer.betfair.com and open url
    https://videoplayer.betfair.com/GetPlayer.do?width={0}&height={1}&mID={2} with your values for width, height and marketId.​

    Comment

    • Onix
      Junior Member
      • Aug 2019
      • 13

      #3
      Originally posted by WTPooh View Post
      This is possible using Microsoft WebView2. You need to add cookie ssoid = yourSessionToken for videoplayer.betfair.com and open url
      https://videoplayer.betfair.com/GetPlayer.do?width={0}&height={1}&mID={2} with your values for width, height and marketId.​
      Thank you, works ok, just i use usual Chrome browser to display the stream

      Comment

      • figgypsycho
        Junior Member
        • Dec 2023
        • 2

        #4
        Originally posted by WTPooh View Post
        This is possible using Microsoft WebView2. You need to add cookie ssoid = yourSessionToken for videoplayer.betfair.com and open url
        https://videoplayer.betfair.com/GetPlayer.do?width={0}&height={1}&mID={2} with your values for width, height and marketId.​
        I'm new here. I followed your instructions but the result still failed.

        Comment

        • WTPooh
          Member
          • May 2012
          • 88

          #5
          Here's how it's done in my VB.NET program:
          1. Create a new form (Windows Form) LiveVideo with a public variable marketId
          Code:
          Public marketId As String
          2. Add a local variable webView
          Code:
          Private webView As Microsoft.Web.WebView2.WinForms.WebView2
          3. In the Form.Load procedure, add the following lines
          Code:
          webView = New Microsoft.Web.WebView2.WinForms.WebView2 With
          {
              .Location = New Point(???, ???),
              .Size = New Size(???, ???)
          }​
          Controls.Add(webView)
          InitializeAsync()
          4. Code for InitializeAsync()
          Code:
          Async Sub InitializeAsync()
              Await webView.EnsureCoreWebView2Async()
              Dim c = webView.CoreWebView2.CookieManager.CreateCookie("ssoid", yourSessionToken, "videoplayer.betfair.com", "/")
              webView.CoreWebView2.CookieManager.AddOrUpdateCookie(c)
              Play(marketId)
          End Sub​
          5. Code for Play()
          Code:
          Sub Play(marketId As String)
              Const videoUrl As String = "https://videoplayer.betfair.com/GetPlayer.do?width={0}&height={1}&mID={2}"
              Dim url = String.Format(videoUrl, xSize, ySize, marketId)
              webView.CoreWebView2.Navigate(url)
          End Sub​
          6. Using LiveVideo class
          Code:
          Dim v As New LiveVideo With {.marketId = marketId}
          v.Show()​

          Comment

          Working...
          X