VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. how to get a fresh acces token in mdstrm... in this url .. form a emebed insert in

    tvnpass.com

    HTML Code:
    https://mdstrm.com/live-stream/64cbe53b46ee28089166c04f?jsapi=true&autoplay=true&controls=true&player=6652933c62f44c32939f8007&access_token=tYzSr3kGP93S9wTNaL5fcGwQbJ2DQmcaEGUyHqR6m37VaHAxxdqGlm2RcemvPxFELvU1k3aOJvO
    Quote Quote  
  2. lol ... refresh page ?
    Quote Quote  
  3. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Code:
    import json
    
    import requests
    
    GRAPHQL_URL = 'https://next.platform.mediastre.am/graphql'
    OTT_URL = 'https://next.platform.mediastre.am/ott'
    LIVE_STREAM_URL = 'https://mdstrm.com/live-stream/{live_stream_id}?jsapi=true&autoplay=true&controls=true&player={player_id}&access_token={access_token}'
    
    response = json.loads(requests.get(
        OTT_URL, params={'domain': 'tvnpass.com'}
    ).content.decode())
    response = response["data"]
    
    response = json.loads(requests.get(
        response + '/release.json',
    ).content.decode())
    client_id = response["config"]["api"]["headers"]["x-client-id"]
    
    response = json.loads(requests.post(
        GRAPHQL_URL, headers={'x-client-id': client_id},
        json={
            'operationName': 'getConfig', 'variables': {},
            'query': ' query getConfig { getConfig } '
        }
    ).content.decode())
    player_id = response["data"]["getConfig"]["player"]["id"]
    
    response = json.loads(requests.post(
        GRAPHQL_URL, headers={'x-client-id': client_id},
        json={
            'operationName': 'getLivesHeroEpg',
            'query': '''
                query getLivesHeroEpg {
                  getLives {
                    _id name
                    schedules(hours: 24, page: {limit: 0, page: 1}) { _id }
                  }
                }
            '''
        }
    ).content.decode())
    response = response["data"]["getLives"]
    
    lives = []
    for live in response:
        if len(live.get("schedules", [])) == 0:
            continue
        if live["_id"] in [l[0] for l in lives]:
            continue
    
        lives.append((live["_id"], live["name"], live["schedules"][0]["_id"]))
    
    for live_id, live_name, schedule_id in lives:
        response = json.loads(requests.post(
            GRAPHQL_URL, headers={'x-client-id': client_id},
            json={
                'operationName': 'getPlayerSchedule',
                'variables': {'id': schedule_id},
                'query': '''
                    query getPlayerSchedule($id: String!) {
                      getSchedule(_id: $id) { live { accessToken } }
                    }
                '''
            }
        ).content.decode())
        response = response["data"]["getSchedule"]["live"]
    
        access_token = response["accessToken"]
        live_stream_url = LIVE_STREAM_URL.format(
            live_stream_id=live_id,
            player_id=player_id,
            access_token=access_token
        )
    
        print(live_name, live_stream_url)
    Code:
    TVN EN VIVO https://mdstrm.com/live-stream/64cbe53b46ee28089166c04f?jsapi=true&autoplay=true&controls=true&player=6652933c62f44c32939f8007&access_token=6Hpb3qLEimpDcOvkQDWJCZ3HEyw6SpE5Q0aS8fjsOhgb6mnsSi6UTRuhrjJKm24NgEDEKciikcE
    TVMAX EN VIVO https://mdstrm.com/live-stream/65d4c7bcbe741b6c4131bd70?jsapi=true&autoplay=true&controls=true&player=6652933c62f44c32939f8007&access_token=iS896FeCd5RlijiVOcZVnYrK1wORfX8ih7rlMSe3TCaXXEJdMFD4dAEc0KISAQ3PZyF5nv23fY2
    TVN RADIO (VIDEO) https://mdstrm.com/live-stream/65d4c68470d6fd087fe7d8fb?jsapi=true&autoplay=true&controls=true&player=6652933c62f44c32939f8007&access_token=drBPQKUSbhIwTQihOM04Rgz8RUwi6RJChBq9rTEAPxWPsbWNijQv8vbkqUo8A1ufX8At1NUQiSB
    TVN RADIO https://mdstrm.com/live-stream/654a5c9f40fd924d7ba3cd41?jsapi=true&autoplay=true&controls=true&player=6652933c62f44c32939f8007&access_token=TadjQsmZBk3En9DixnAe3Yeunx61hJ9pFu3KWf5yR2E2FOwLlhsBF389xd2M0Ua1hI3EZFEx057
    --[----->+<]>.++++++++++++.---.--------.
    [*Have questions about widefrog? You can find all your answers here*]
    Quote Quote  
  4. thanks so much... Do you know how long tokens last?

    Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Code:
    import json
    
    import requests
    
    GRAPHQL_URL = 'https://next.platform.mediastre.am/graphql'
    OTT_URL = 'https://next.platform.mediastre.am/ott'
    LIVE_STREAM_URL = 'https://mdstrm.com/live-stream/{live_stream_id}?jsapi=true&autoplay=true&controls=true&player={player_id}&access_token={access_token}'
    
    response = json.loads(requests.get(
        OTT_URL, params={'domain': 'tvnpass.com'}
    ).content.decode())
    response = response["data"]
    
    response = json.loads(requests.get(
        response + '/release.json',
    ).content.decode())
    client_id = response["config"]["api"]["headers"]["x-client-id"]
    
    response = json.loads(requests.post(
        GRAPHQL_URL, headers={'x-client-id': client_id},
        json={
            'operationName': 'getConfig', 'variables': {},
            'query': ' query getConfig { getConfig } '
        }
    ).content.decode())
    player_id = response["data"]["getConfig"]["player"]["id"]
    
    response = json.loads(requests.post(
        GRAPHQL_URL, headers={'x-client-id': client_id},
        json={
            'operationName': 'getLivesHeroEpg',
            'query': '''
                query getLivesHeroEpg {
                  getLives {
                    _id name
                    schedules(hours: 24, page: {limit: 0, page: 1}) { _id }
                  }
                }
            '''
        }
    ).content.decode())
    response = response["data"]["getLives"]
    
    lives = []
    for live in response:
        if len(live.get("schedules", [])) == 0:
            continue
        if live["_id"] in [l[0] for l in lives]:
            continue
    
        lives.append((live["_id"], live["name"], live["schedules"][0]["_id"]))
    
    for live_id, live_name, schedule_id in lives:
        response = json.loads(requests.post(
            GRAPHQL_URL, headers={'x-client-id': client_id},
            json={
                'operationName': 'getPlayerSchedule',
                'variables': {'id': schedule_id},
                'query': '''
                    query getPlayerSchedule($id: String!) {
                      getSchedule(_id: $id) { live { accessToken } }
                    }
                '''
            }
        ).content.decode())
        response = response["data"]["getSchedule"]["live"]
    
        access_token = response["accessToken"]
        live_stream_url = LIVE_STREAM_URL.format(
            live_stream_id=live_id,
            player_id=player_id,
            access_token=access_token
        )
    
        print(live_name, live_stream_url)
    Code:
    TVN EN VIVO https://mdstrm.com/live-stream/64cbe53b46ee28089166c04f?jsapi=true&autoplay=true&controls=true&player=6652933c62f44c32939f8007&access_token=6Hpb3qLEimpDcOvkQDWJCZ3HEyw6SpE5Q0aS8fjsOhgb6mnsSi6UTRuhrjJKm24NgEDEKciikcE
    TVMAX EN VIVO https://mdstrm.com/live-stream/65d4c7bcbe741b6c4131bd70?jsapi=true&autoplay=true&controls=true&player=6652933c62f44c32939f8007&access_token=iS896FeCd5RlijiVOcZVnYrK1wORfX8ih7rlMSe3TCaXXEJdMFD4dAEc0KISAQ3PZyF5nv23fY2
    TVN RADIO (VIDEO) https://mdstrm.com/live-stream/65d4c68470d6fd087fe7d8fb?jsapi=true&autoplay=true&controls=true&player=6652933c62f44c32939f8007&access_token=drBPQKUSbhIwTQihOM04Rgz8RUwi6RJChBq9rTEAPxWPsbWNijQv8vbkqUo8A1ufX8At1NUQiSB
    TVN RADIO https://mdstrm.com/live-stream/654a5c9f40fd924d7ba3cd41?jsapi=true&autoplay=true&controls=true&player=6652933c62f44c32939f8007&access_token=TadjQsmZBk3En9DixnAe3Yeunx61hJ9pFu3KWf5yR2E2FOwLlhsBF389xd2M0Ua1hI3EZFEx057
    Quote Quote  
  5. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    You're welcome. No idea. But judging by the fact that some of the URLs I posted have an invalid token now. I'd say the lifetime it's 3 hours at worst. Depends on the livestream I guess, since the others seem to be still working.
    --[----->+<]>.++++++++++++.---.--------.
    [*Have questions about widefrog? You can find all your answers here*]
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!