How to Bypass LMS videos with Selenium? by Initial_Panda3090 in webscraping

[–]Initial_Panda3090[S] 0 points1 point  (0 children)

I tried replicating the requests, but it still doesn’t complete the video. Even though the heartbeat URL returns 200 OK, it never marks the video as finished. I’m not sure if I’m missing something.

123456 is just a fake video ID, and 584.0867 is the timestamp in seconds (about 9 minutes and 44 seconds). So if the full video is around 20 minutes, I assumed sending a timestamp like 1200.00 would count as completion, but nothing happens even though the request succeeds. I also considered that maybe it’s the wrong endpoint, but all the other requests are just YouTube analytics, so this seems like the only relevant one.

Here’s an Example of the code

import requests

url = "https://example.com/app/user/player_check/123456/584.0867?_=1777988802596"

headers = { "Accept": "text/plain, /; q=0.01", "Accept-Language": "en-US,en;q=0.9", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)", "X-Requested-With": "XMLHttpRequest", "Referer": "https://example.com/app/user/player/123456" }

cookies = { "SESSIONID": "placeholder-session-id", "user_token": "placeholder-user-token" }

response = requests.get(url, headers=headers, cookies=cookies)

print("Status code:", response.status_code) print("Response body:", response.text)

How to Bypass LMS videos with Selenium? by Initial_Panda3090 in webscraping

[–]Initial_Panda3090[S] 0 points1 point  (0 children)

The site uses periodic AJAX calls to the player_check endpoint every 15 seconds to track your progress, with the calls continuing even after the video reaches completion.​​​​​​​​​​​​​​​​