Új hozzászólás Aktív témák

  • Hege1234

    addikt

    válasz sztanozs #3158 üzenetére

    köszi, addig mindent szépen szűr amíg a FIXTV nincs hozzáadva
    ha azt is hozzáírom akkor már elhasal

    import requests
    from bs4 import BeautifulSoup

    html_url22 = "http://streamstat.net/videoplayer.cgi?sid=14358315&ext=.m3u8"
    html_response = requests.get(html_url22)
    soup = BeautifulSoup(html_response.text, 'html.parser')
    for vid in soup.find_all('source'):
    CINELIFEHD = vid['src']

    html_url23 = "http://streamstat.net/videoplayer.cgi?sid=148177550&ext=.m3u8"
    html_response = requests.get(html_url23)
    soup = BeautifulSoup(html_response.text, 'html.parser')
    for vid in soup.find_all('source'):
    FIXTV = vid['src']

    html_url40 = "https://raw.githubusercontent.com/Special2020/Iptv-hu.m3u/master/Uj%20T%20A.m3u"
    ExtremeSportsChannel = requests.get(html_url40)

    html_url14 = "https://onlinestream.live/fem3/videoplayer/6455-1"
    html_response = requests.get(html_url14)
    soup = BeautifulSoup(html_response.text, 'html.parser')
    for vid in soup.find_all('source'):
    fem3 = vid['src']

    if 'http' in vid['src']:
    print(
    "#EXTM3U"
    + '\n' +
    "#EXTINF:0,tvg-logo=https://cinelife.com/wp-content/uploads/2020/04/cinelife_logo.png, CINE LIFE HD" + '\n' +
    CINELIFEHD + '\n' +
    "#EXTINF:0,tvg-logo=http://1241.hu/userfiles/image/tvcsatornak/fem3.jpg, FEM3" + '\n' +
    fem3 + '\n'
    "#EXTINF:0,tvg-logo=https://cdn.pngsumo.com/tv-guide-extreme-sports-channel-the-home-of-action-sports-action-sports-png-320_240.png, Extreme Sports Channel" + '\n' +
    ExtremeSportsChannel.text.split("\n")[308]
    + '\n' + "#EXTINF:0,tvg-logo=http://1241.hu/userfiles/image/tvcsatornak/pic_atkoto_55_fix_tv.png, Fix" + '\n' +
    FIXTV
    ,file=open("test.m3u8", "w"))

    Traceback (most recent call last):
    File "C:\scrape\test.py", line 37, in <module>
    FIXTV
    NameError: name 'FIXTV' is not defined

    ha csak az egyszerűbb verziót printelem ki akkor is ezt írja
    if 'http' in vid['src']:
    print(CINELIFEHD+FIXTV)

    NameError: name 'FIXTV' is not defined

Új hozzászólás Aktív témák