File size: 2,307 Bytes
11757af
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

import asyncio
from curl_cffi.requests import AsyncSession
from urllib.parse import urlparse

async def test_endpoints():
    filecode = 'vcnw55kah6kp'
    domain = 'f75s.com' # Frame domain
    frame_url = f"https://{domain}/xe4kq/{filecode}" # This might change per request, need valid one
    
    # We first visit details to get fresh frame URL
    async with AsyncSession(impersonate='chrome124', verify=False) as s:
        print("1. getting fresh frame URL...")
        r = await s.get(f"https://bysezejataos.com/api/videos/{filecode}/embed/details", headers={
            "Referer": f"https://bysezejataos.com/e/{filecode}",
            "X-Requested-With": "XMLHttpRequest"
        })
        if r.status_code != 200:
            print("Failed to get details.")
            return
            
        details = r.json()
        frame_url = details.get("embed_frame_url")
        frame_domain = urlparse(frame_url).netloc
        print(f"Fresh Frame: {frame_url}")
        
        # Initialize session on frame
        await s.get(frame_url, headers={"Referer": f"https://bysezejataos.com/e/{filecode}"})
        
        base_api = f"https://{frame_domain}/api/videos/{filecode}"
        
        candidates = [
            f"{base_api}",
            f"{base_api}/",
            f"{base_api}/embed/timeslider",
            f"{base_api}/timeslider",
            f"{base_api}/stream", # We know this gives 403
            f"{base_api}/download",
            f"https://{frame_domain}/api/videos/stream/{filecode}"
        ]
        
        headers = {
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
            "Referer": frame_url,
            "Origin": f"https://{frame_domain}",
            "X-Requested-With": "XMLHttpRequest",
            "X-Byse-Ads-Mode": "1"
        }
        
        print("\n--- Testing Endpoints ---")
        for url in candidates:
            print(f"\nTesting: {url}")
            resp = await s.get(url, headers=headers)
            print(f"Status: {resp.status_code}")
            if resp.status_code == 200:
                print(f"Response: {resp.text[:500]}")
            elif resp.status_code == 403:
                print(f"Response (403): {resp.text}")

if __name__ == "__main__":
    asyncio.run(test_endpoints())