VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. hi i need help to get the m3u8 link from this internet site: https://nova.bg/live

    thanx
    Quote Quote  
  2. is it possible to create python sript to get the link
    Quote Quote  
  3. Originally Posted by kayrak View Post
    is it possible to create python sript to get the link
    Code:
    import requests
    import re
    
    headers = {
        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
        'Connection': 'keep-alive',
        'Referer': 'https://nova.bg/',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36',
    }
    
    resp = requests.get('https://nova.bg/live', headers=headers).text
    live_url_id = re.findall(r'<iframe.*live/(.*?)\"', resp)[0].strip()
    l_url = f'https://i.cdn.bg/live/{live_url_id}'
    
    resp2 = requests.get(l_url, headers=headers).text
    src_p1 = re.findall(r'<source src=\"//(.*?)\"', resp2)[0].strip()
    
    m3u8_link = f'https://{src_p1}'
    print(m3u8_link)
    Quote Quote  
  4. Originally Posted by sk8ordi3 View Post
    Originally Posted by kayrak View Post
    is it possible to create python sript to get the link
    Code:
    import requests
    import re
    
    headers = {
        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
        'Connection': 'keep-alive',
        'Referer': 'https://nova.bg/',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36',
    }
    
    resp = requests.get('https://nova.bg/live', headers=headers).text
    live_url_id = re.findall(r'<iframe.*live/(.*?)\"', resp)[0].strip()
    l_url = f'https://i.cdn.bg/live/{live_url_id}'
    
    resp2 = requests.get(l_url, headers=headers).text
    src_p1 = re.findall(r'<source src=\"//(.*?)\"', resp2)[0].strip()
    
    m3u8_link = f'https://{src_p1}'
    print(m3u8_link)
    thank you
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!