VideoHelp Forum




+ Reply to Thread
Results 1 to 2 of 2
  1. Hi Forum,

    I need help (python scrypt) to get strem link from the site https://tv.bnt.bg/

    Thanks advance
    Quote Quote  
  2. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Code:
    import requests
    from bs4 import BeautifulSoup
    
    SOURCE_URL = "https://tv.bnt.bg"
    
    
    def get_m3u8(source_url):
        response = requests.get(source_url).text
        response = BeautifulSoup(response, 'html.parser')
        response = response.find('iframe', src=lambda x: x and '/live/' in x)
        response = response["src"]
        if not response.startswith("https:"):
            response = f'https:{response}'
        response = requests.get(response, headers={'Referer': source_url})
    
        try:
            response = BeautifulSoup(response.text, 'html.parser')
            response = response.find('source', src=lambda x: x)
            response = response["src"]
            if not response.startswith("https:"):
                response = f'https:{response}'
        except:
            exit("Bulgarian IP needed")
    
        response = f'streamlink "{response}" best --http-header "referer={source_url}"'
        print(response)
    
    
    if __name__ == '__main__':
        get_m3u8(SOURCE_URL)
    Code:
    streamlink "https://lb-ts.cdn.bg/bnt1/fls/bnt1HD_abr.stream/at=...snipped.../playlist.m3u8" best --http-header "referer=https://tv.bnt.bg"
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  



Similar Threads

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