got
+ Reply to Thread
Results 1 to 4 of 4
-
It was a pain to log in because I had to brute force some weird card number but I got it working.
The HLS URL can only be used once and is embedded inside the site's HTML.
To use the code below, enter your video URL from the address bar and the value of your sessionid cookie.
Code:import re import requests if __name__ == '__main__': response = requests.get( url='https://ap.lk/watch-video/<VIDEO ID>', cookies={ 'sessionid': '<sessionid token value>' } ) print(response.status_code) hls_url = re.search( r"'(https://video.ap.lk/stream/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})'", response.text ).group(1) auth_token = re.search( r"'([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})'", response.text ).group(1) print(hls_url) print(auth_token) print(f"N_m3u8DL-RE \"{hls_url}\" -H \"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0\" -H \"SD-Analyze: {auth_token}\" -H \"Origin: https://ap.lk\"")
Bypass HMACs, One-time-tokens and Lic.Wrapping: https://github.com/DevLARLEY/WidevineProxy2
Similar Threads
-
Recorded HLS stream .ts file always shows Packet corrupt (stream = 0, dts
By christopher68koeppiaz in forum Video Streaming DownloadingReplies: 10Last Post: 2nd Jan 2025, 09:48 -
Downloading HLS stream
By Ukarer in forum Video Streaming DownloadingReplies: 2Last Post: 18th Jan 2022, 06:27 -
Recording of HLS stream
By eviljust in forum Video Streaming DownloadingReplies: 5Last Post: 1st Dec 2021, 07:51 -
FFMPEG Save video from rtsp stream to hls stream
By Wisperrio in forum Video Streaming DownloadingReplies: 2Last Post: 26th Aug 2021, 22:38 -
HLS Protected Stream Downloading Help
By Yamiraan in forum Video Streaming DownloadingReplies: 6Last Post: 30th Mar 2021, 15:57