コード例 #1
0
def qtv(a,b):
    qtv_url='http://v.91kds.cn/c9/'+a+'.m3u8?id='+b+'&'+livekey
    print(qtv_url)
    headers2 = {'Referer': 'http://m.91kds.org/jiemu_cctv1.html',
                'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36',
                'Accept-Encoding': 'identity;q=1, *;q=0', 'chrome-proxy': 'frfr', }
    r=geturl(qtv_url,headers=headers2)
    print(b+'\n',r)
コード例 #2
0
def QQliveClass():
    r=geturl(qq,headers=headers)
    #print(r)
    layoutid=re.findall(r'a href="/livelist\?layoutid=(.+?)"',r)
    titles=re.findall(r'target="_blank" title="(.+?)"',r)
    del titles[0]
    d=dict(zip(titles,layoutid))
    #for x,y in d.items():
        #print(x,y)
    return d
コード例 #3
0
ファイル: bfgd.py プロジェクト: kdzm/Channel
def access_token(devc1=firstdevc()):
    #devc1=firstdevc()
    get_accesstoken = 'http://access.bfgd.com.cn:12690/account/login?isforce=1&accesstoken=' + devc1 + '&accounttype=2&deviceno=' + '69DCCBEC6DFECD4A8EE17509EE7D7D77f&pwd=96e79218965eb72c92a549dd5a330112&devicetype=3&account=40169031313'
    r3 = geturl(get_accesstoken, headers=headers1)
    #print(r3)
    n1 = r3.find('"access_token" : "') + len('"access_token" : "')
    n2 = r3.find('",', n1)
    access_tokens = r3[n1:n2]
    print(access_tokens)
    n3 = r3.find('"device_id" : ') + len('"device_id" : ')
    n4 = r3.find(',', n3)
    verifycode = r3[n3:n4]
    return (access_tokens, verifycode)
コード例 #4
0
ファイル: bfgd.py プロジェクト: kdzm/Channel
    n2 = r3.find('",', n1)
    access_tokens = r3[n1:n2]
    print(access_tokens)
    n3 = r3.find('"device_id" : ') + len('"device_id" : ')
    n4 = r3.find(',', n3)
    verifycode = r3[n3:n4]
    return (access_tokens, verifycode)


(a, c) = access_token()
listtype = {'1775': "高清频道", '2114': "标清频道", '3256': "本地频道", '3520': "国际频道"}
channel_ids = []
channel_names = []
for l in listtype:
    idurl = 'http://slave.bfgd.com.cn:13160/homed/program/get_list?musicsize=246x138&label=' + l + '&accesstoken=' + a + '&pagenum=78&vodsize=246x138&chnlsize=90x90%7C246x138&pageidx=1&livesize=246x138&hdsize=246x138&appsize=246x138&sdsize=246x138'
    r1 = geturl(idurl, headers=headers1)
    #print(r1)
    #print(r1)
    p1 = r'{"id":4200000[0-9]{3}'
    p2 = r':1,"name":".+?"'
    pattern1 = re.compile(p1)
    pattern2 = re.compile(p2)
    channel_id = pattern1.findall(r1)
    channel_name = pattern2.findall(r1)
    for id in channel_id:
        id = id.replace('{"id":', '')
        channel_ids.append(id)
    for name in channel_name:
        name = name.replace(':1,"name":"', '').replace('"', '')
        channel_names.append(name)
channels = dict(zip(channel_names, channel_ids))
コード例 #5
0
ファイル: 益阳电视台.py プロジェクト: wyf88/Channel
import requests
from requestget import posturl
from requestget import geturl
import re
u1='https://www.yyrtv.com/'
h1={'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36','Cookie':'zycna=cpVarJqd/MsBAT2QkG22Vt/m; SL_GWPT_Show_Hide_tmp=1; SL_wptGlobTipTmp=1; Hm_lvt_52ca1c67e4ae3d21a3cb493fcc180fe3=1560995517,1560999416; Hm_lpvt_52ca1c67e4ae3d21a3cb493fcc180fe3=1560999416'}
r1=geturl(u1,headers=h1)
rtmp=re.findall(r'rtmp://.+?liveevent',r1)
name=re.findall(r'<p title="(.+?)"',r1)
name=name[16:19]
d=dict(zip(name,rtmp))
for a,b in d.items():
    print(a,b)
コード例 #6
0
from requestget import geturl

headers = {
    'User-Agent': 'okhttp/3.9.1',
    'Host': 'apiklds.clouddianshi.com:8882',
    'SAAS': 'cn.grtech.tv'
}
url = 'http://apis.abc.com/ntvlive/newstest'
url2 = 'http://live.stream.tvmcloud.com/token/uatoken?app=js&format=json&string=eJwdyMsKwjAQBdAvEibTzvRmJ65c1seiu5BJjCCVahHaQj5ecXc4yxqmZTf0j%2FEyy7kf%2FR2363T4DE%2BZw%2FEUaK%2FEMHDHJVlmB%2FOa1dmvyl%2F1Dd5eUmuhNiFHKhHWEmCpc9wIRVKv0vAXNXQgLQ%3D%3D'
r = geturl(url, headers=headers)
print(r)
コード例 #7
0
        url='https://share.egame.qq.com/cgi-bin/pgg_live_async_fcgi?param=%7B%22key%22:%7B%22module%22:%22pgg_live_read_ifc_mt_svr%22,%22method%22:%22get_pc_live_list%22,%22param%22:%7B%22appid%22:%222000000110%22,%22page_num%22:'+str(n)+'%22page_size%22:40,%22tag_id%22:0,%22tag_id_str%22:%22%22%7D%7D%7D&app_info=%7B%22platform%22:4,%22terminal_type%22:2,%22egame_id%22:%22egame_official%22,%22imei%22:%22%22,%22version_code%22:%229.9.9.9%22,%22version_name%22:%229.9.9.9%22%7D&g_tk=1189253248&p_tk=&tt=1&_t=1557970472533'
        r=geturl(url,headers=headers)
        print(r)
        '''
    room_id=re.findall(r'"anchor_id":(\d*),',f)
    room_name=re.findall(r'anchor_name":"(.+?)"',f)
    print(len(room_id))
    print(len(room_name))
    #if n==1:
       # del room_name[0]
    class_allroom=dict(zip(room_name,room_id))
    #del class_allroom['下载APP']
    for x,y in class_allroom.items():
        room_url='https://egame.qq.com/'+y
        res=geturl(room_url,headers=headers)
        playurl=re.findall(r'playUrl":"(.+?.flv)',res)
        if len(playurl)==0:
           playurl='http://3954.liveplay.myqcloud.com/live/3954_320942587.flv'
        else:
            playurl=playurl[0]
        playurls.append(playurl)
        print(x+'\t',playurl)
    print('----------------------')
    with open(i+'.dpl', 'w', encoding="utf-8") as f: f.write('')
    with open(i+'.dpl', 'a', encoding="utf-8") as f: f.write('DAUMPLAYLIST\n'+'playname=\n'+'topindex=27\n'+'saveplaypos=0\n')
    for u in playurls:
        j=playurls.index(u)
        (x,y)=lists(room_name[j], u)
        with open(i+'.dpl', 'a+', encoding="utf-8") as f: f.write(str(j + 1) + x + "\n" + str(j + 1) + y + "\n" + str(j + 1) + '*played*0\n')
    os.system('C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Daum\\PotPlayer 64 bit.exe')
コード例 #8
0
ファイル: mgchaclass.py プロジェクト: wyf88/Channel
def mgreurl():
    name = []
    id = []
    xurls = []
    url1 = 'http://live.miguvideo.com/live/v2/tv-data/70002091'
    headers = {
        'User-Agent':
        'Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12F70 MicroMessenger/6.2.3 NetType/WIFI Language/zh_CN'
    }
    r1 = geturl(url1, headers=headers)
    #print(r1)
    cha_classs = re.findall(r'name":".+?vomsID', r1)
    class_id = re.findall(r'"vomsID":".+?"', r1)
    #print(cha_classs)
    #mgch=dict()
    for x in cha_classs:
        cha_classs[cha_classs.index(x)] = x.replace('name":"', '').replace(
            '","vomsID', '')
#print(cha_classs)
    for y in class_id:
        class_id[class_id.index(y)] = y.replace('"vomsID":"',
                                                '').replace('"', '')
#print(class_id)
    cla = dict(zip(cha_classs, class_id))
    for x, y in cla.items():
        #print(x,y)
        #print(x)
        url = 'http://live.miguvideo.com/live/v2/tv-data/' + y
        r = geturl(url, headers=headers)
        channels = re.findall(r'name":".+?"', r)
        for a in range(0, len(cla)):
            del channels[0]
    #print(channels)
        for b in channels:
            channels[channels.index(b)] = b.replace('name":"',
                                                    "").replace('"', '')
    #print(channels)
        channels_id = re.findall(r'pID":".+?"', r)
        for c in channels_id:
            channels_id[channels_id.index(c)] = c.replace('pID":"',
                                                          '').replace('"', '')
    #print(channels_id)
        channels_ = dict(zip(channels, channels_id))
        #mgch=mgch+channels_
        for i, j in channels_.items():
            #print(x,y)
            id.append(j)
            name.append(i)
            t = str(int(time.time()))
            clientId = get_token(message=t).upper()
            xurl = 'http://yk.miguvideo.com/playurl/v1/play/playurlh5?contId=' + j + '&rateType=2&clientId=' + clientId
            #print(i,xurl)
            xurls.append(xurl)
            #return
        #print('**************************************')
    ch = dict(zip(name, xurls))
    #print(ch)
    return ch


#print(mgch)
コード例 #9
0
ファイル: 游戏放映室.py プロジェクト: wyf88/Channel
from DPL频道列表模板 import lists
from 直播平台.战旗直播.base64a import zqbsurl
import os
#url='https://www.zhanqi.tv/games/Entertainment'
r_ids = []
r_nas = []
for i in range(1, 3):
    url = 'https://www.zhanqi.tv/api/static/v2.1/game/live/45/30/' + str(
        i) + '.json'
    header = {
        'Referer':
        'https://www.zhanqi.tv/',
        'User-Agent':
        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36'
    }
    r = geturl(url, headers=header)
    r_id = re.findall(r'"url":"\\/(.+?)"', r)
    r_na = re.findall(r'"title":"(.+?)"', r)
    r_ids = r_ids + r_id
    r_nas = r_nas + r_na
#print(r_id)
'''
for i in range(0,21):
    del r_id[0]
'''
print(r_nas)
for i in r_nas:
    x = i.replace('\\\\', '\\')
    r_nas[r_nas.index(i)] = x
    y = x.encode('utf-8').decode('unicode_escape')
    r_nas[r_nas.index(x)] = y
コード例 #10
0
}
headers = {
    'User-Agent':
    'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',
    'Referer': 'http://www.cbg.cn/live/lndex.shtml',
    'Host': 'app.cbg.cn',
    'X-Requested-With': 'ShockwaveFlash/22.0.0.192'
}
ch = {
    '汽摩': '5',
    '新闻': '3',
    '时尚': '17',
    '科教': '9',
    '生活': '12',
    '都市': '10',
    '少儿': '19',
    '移动': '16',
    '娱乐': '11',
    '影视': '6',
    '农村': '18',
    '手持电视': '20'
}
res = geturl(urlr, headers=headers2)
print(res)
for x, id in ch.items():
    url = 'http://app.cbg.cn/?app=activity&controller=wwsp&action=hlive_md5&callback=jQuery17208145252600791988_1560739117765&ch=%2Fapp_2%2F_definst_%2Fls_' + id + '.stream%2Fchunklist.m3u8&_=1560739124932'
    r = geturl(url, headers=headers)
    playurl = re.findall('http.+?m3u8', r)
    playurl = playurl[0].replace('\\', '')
    print(x, playurl)
コード例 #11
0
ファイル: dytv.py プロジェクト: chence/Channel
from requestget import geturl
url = 'https://www.douyu.com/g_yqk'
r = geturl(url)
print(r)
コード例 #12
0
ファイル: bfgd.py プロジェクト: wyf88/Channel
    access_tokens = r3[n1:n2]
    #print(access_tokens)
    n3 = r3.find('device_id":') + len('device_id":')
    n4 = n3 + 10
    verifycode = r3[n3:n4]
    #print(verifycode)
    return (access_tokens, verifycode)


(a, c) = access_token()
listtype = {'1775': "高清频道", '2114': "标清频道", '3256': "本地频道", '3520': "国际频道"}
channel_ids = []
channel_names = []
for l in listtype:
    idurl = 'http://slave.bfgd.com.cn:13160/homed/program/get_list?musicsize=246x138&label=' + l + '&accesstoken=' + a + '&pagenum=78&vodsize=246x138&chnlsize=90x90%7C246x138&pageidx=1&livesize=246x138&hdsize=246x138&appsize=246x138&sdsize=246x138'
    r1 = geturl(idurl, headers=headers1)
    p1 = r'{"id":4200000[0-9]{3}'
    p2 = r':1,"name":".+?"'
    pattern1 = re.compile(p1)
    pattern2 = re.compile(p2)
    channel_id = pattern1.findall(r1)
    channel_name = pattern2.findall(r1)
    for id in channel_id:
        id = id.replace('{"id":', '')
        channel_ids.append(id)
    for name in channel_name:
        name = name.replace(':1,"name":"', '').replace('"', '')
        channel_names.append(name)
channels = dict(zip(channel_names, channel_ids))
with open('bfgd.txt', 'w', encoding="utf-8") as f:
    f.write("")
コード例 #13
0
ファイル: HRBTV.py プロジェクト: wyf88/Channel
import re
from requestget import geturl
import requests
import io
import string

headers = {
    'User-Agent':
    'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'
}
url1 = 'http://liveapp.cutv.com/crossdomain/timeshiftinglive/getTSLAllChannelList/first/sztv'
t = geturl(url1, headers)
print(t)
p1 = r'flag":".+?","channellist"'
pattern = re.compile(p1)
name = pattern.findall(t)
print(name)
names = []
zs = []
ys = []
for x in name:
    x = x.replace('flag":"', '').replace(',"channellist"',
                                         '').replace('","name":"', '')
    n = x.find("\\")
    y = x[0:n]
    #print(y)
    ys.append(y)
    z = x[n:-1]
    #print(z)
    zs.append(z)
    #z1=z.decode('unicode-escape')
コード例 #14
0
    "黑龙江新闻": "9",
    "黑龙江影视": "10"
}
headers = {
    'Referer': 'http://www.hljtv.com/live/',
    "User-Agent":
    'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36',
    'Referer': 'http://www.hljtv.com/live/',
    'Host': 'www.hljtv.com'
}
name = hljtvid.keys()
for m in name:
    url = "http://www.hljtv.com/m2o/player/channel_xml.php?id=" + hljtvid[
        m] + "&extend=&url=http://www.hljtv.com/live/&access/token=&first=1"
    #url = "http://www.hljtv.com/m2o/player/channel_xml.php?id=8&extend=&url=http://www.hljtv.com/live/&access/token=&first=1"
    x = geturl(url, headers)
    n1 = x.find('drm="1">') + len('drm="1">')
    n2 = x.find('php') + 3
    drm = x[n1:n2]
    #print(drm)
    n3 = x.find('" baseUrl="') + len('" baseUrl="')
    n4 = x.find('"><item url')
    baseurl = x[n3:n4]
    baseurl = baseurl + "sd/live.m3u8"
    #print(m,baseurl)
    n = time.time()
    #print(n)
    millis = int(n * 1000)
    #print(millis)
    playerVersion = "4.12.180327_RC"
    refererurl = "http://www.hljtv.com/"
コード例 #15
0
#南宁
from requestget import geturl
import re
urlnn='http://app.nntv.cn/api/tt_live.php?type=1' \
      'http://app.nntv.cn/api/tt_live.php?type=1'
header1={'User-Agent': 'LuaSocket 3.0-rc1'}
r=geturl(urlnn,headers=header1)
print(r)
n1=re.findall(r'http:\\/\\/m3u8.nntv.cn.+?.m3u8',r)
#n2=r.find('sd.m3u8',n1)+len('sd.m3u8')
#video_url=r[n1:n2].replace('\\','')
id=re.findall(r'"id":"[0-9]{7}',r)
for x in id:
    n=id.index(x)
    n1[n]='http://cc.linkinme.com/nanning/'+x.replace('"id":"','')+"   "+n1[n].replace('\\','')
    print(n1[n])
#   rtmp://180.141.89.20/live/HXTV横县电视台     rtmp://180.141.89.20/live/MSTV马山电视台
コード例 #16
0
ファイル: 91kds.py プロジェクト: wyf88/Channel
    auth = 'http://m.91kds.org/auth3.php?t=' + str(random.random())
    r = geturl(auth, headers=headers)
    livekey = re.findall(r'(nwtime.+?)"', r)
    livekey = livekey[0]
    return livekey


#print(get_livekey())
file = open(
    "C:\\Users\\Administrator\\PycharmProjects\\频道破解\\91看电视\\91ktv.txt",
    "r+",
    encoding='utf-8')
#得到livekey
f = file.read()
auth = 'http://m.91kds.org/auth3.php?t=' + str(random.random())
r = geturl(auth, headers=headers)
#print(r)
n1 = r.find('":"') + len('":"')
n2 = r.find('"', n1)
livekey = r[n1:n2]


def qtv(a, b):
    qtv_url = 'http://v.91kds.cn/b9/' + a + '.m3u8?id=' + b + '&' + livekey
    #print(qtv_url)
    headers2 = {
        'Referer': 'http://m.91kds.org/jiemu_cctv1.html',
        'User-Agent':
        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36',
        'Accept-Encoding': 'identity;q=1, *;q=0',
        'chrome-proxy': 'frfr',
コード例 #17
0
ファイル: 91kds.py プロジェクト: wyf88/Channel
def get_livekey():
    auth = 'http://m.91kds.org/auth3.php?t=' + str(random.random())
    r = geturl(auth, headers=headers)
    livekey = re.findall(r'(nwtime.+?)"', r)
    livekey = livekey[0]
    return livekey
コード例 #18
0
ファイル: cutv.py プロジェクト: wyf88/Channel
#南宁
from requestget import geturl
import re
urlnn='http://app.nntv.cn/api/tt_live.php?type=1' \
      'http://app.nntv.cn/api/tt_live.php?type=1'
header1 = {'User-Agent': 'LuaSocket 3.0-rc1'}
r = geturl(urlnn)
n1 = re.findall(r'http:\\/\\/m3u8.nntv.cn.+?.m3u8', r)
id = re.findall(r'"id":"[0-9]{7}', r)
for x in id:
    n = id.index(x)
    i = x.replace('"id":"', '')
    n1[n] = n1[n].replace('\\', '')
    print(n1[n])
    r = geturl(n1[n])
    print(r)
    ts = re.findall(r'/cutvlive/streams/events/.+?ts', r)
    for t in ts:
        ts[ts.index(t)] = 'http://m3u8.nntv.cn' + t
    print(i, ts)
#   rtmp://180.141.89.20/live/HXTV横县电视台     rtmp://180.141.89.20/live/MSTV马山电视台
コード例 #19
0
from MD5 import get_token
import string
from requestget import geturl
#http://live.miguvideo.com/live/v2/tv-data/70002091
#http://live.miguvideo.com/live/v2/tv-data/
#http://47.95.69.248/gslb/live?stream_id=cctv3&region=310000&isp=telecom&uuid=1w9e8ex5-uo4j-k1h6-e5d2-olkclokyegoh&ver=1.0.8
import time
from 咪咕视频.mgchaclass import mgreurl
headers = {
    'User-Agent':
    'Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12F70 MicroMessenger/6.2.3 NetType/WIFI Language/zh_CN'
}
'''
t=int(time.time())
clientId=get_token(message=str(t)).upper()
print(clientId)
url='http://yk.miguvideo.com/playurl/v1/play/playurlh5?contId='+651632657+'&rateType=2&clientId='+clientId
headers={'User-Agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12F70 MicroMessenger/6.2.3 NetType/WIFI Language/zh_CN'}
r=geturl(url,headers=headers)
print(r)
n1=r.find('"url":"')+len('"url":"')
n2=r.find('"',n1)
playurl=r[n1:n2]
print(playurl)'''
a = mgreurl()
for x, y in a.items():
    print(x, y)
r = geturl(y, headers=headers)
print(r)
コード例 #20
0
from requestget import geturl
#http://live.miguvideo.com/live/v2/tv-data/70002091
#http://live.miguvideo.com/live/v2/tv-data/
#http://47.95.69.248/gslb/live?stream_id=cctv3&region=310000&isp=telecom&uuid=1w9e8ex5-uo4j-k1h6-e5d2-olkclokyegoh&ver=1.0.8
from 地方台.咪咕视频.mgchaclass import mgreurl
headers={'User-Agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12F70 MicroMessenger/6.2.3 NetType/WIFI Language/zh_CN'}
'''
t=int(time.time())
clientId=get_token(message=str(t)).upper()
print(clientId)
url='http://yk.miguvideo.com/playurl/v1/play/playurlh5?contId='+651632657+'&rateType=2&clientId='+clientId
headers={'User-Agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12F70 MicroMessenger/6.2.3 NetType/WIFI Language/zh_CN'}
r=geturl(url,headers=headers)
print(r)
n1=r.find('"url":"')+len('"url":"')
n2=r.find('"',n1)
playurl=r[n1:n2]
print(playurl)
'''
a=mgreurl()
url=list(a.values())
for x,y in a.items():
    r=geturl(url[0],headers=headers)
    #playurl=r['body']['urlInfo']['url']
    #print(x,playurl)
print(r)
コード例 #21
0
import requests
import string
import os
import re
from requestget import geturl
from DPL频道列表模板 import lists
headers = {
    "referer":
    "https://www.huya.com/l",
    "user-agent":
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36"
}
yiqikan = "http://www.huya.com/g/2135"
rx = geturl(yiqikan, headers)
#print(rx)
p1 = r"https://www.huya.com/[1-9]{7,9}"
pattern1 = re.compile(p1)
roomid = re.findall(
    r'(https://www.huya.com/.+?)" class="title new-clickstat" report=', rx)
title = re.findall(r'target="_blank">(.+?)</a>', rx)
urls = []
for x in roomid:
    i = roomid.index(x)
    url = x
    r = geturl(url, headers=headers)
    n1 = r.find('"sHlsUrl":"')
    n2 = r.find('","', n1)
    r1 = r[n1 + len('"sHlsUrl":"'):n2]
    r2 = r1.replace('\\', '')
    n3 = r.find('"sStreamName":"') + len('"sStreamName":"')
    n4 = r.find('","sFlvUrl":"')
コード例 #22
0
import requests
import string
import os
import re
from requestget import geturl
from lxml import etree
url = 'http://www.yzntv.com/tvlist'
headers = {
    'Cookie':
    'JSESSIONID=952C2BB01B51AC16F9B85630311623F7; UM_distinctid=16b6ddeef9031a-0fd2087250ae87-6353160-1fa400-16b6ddeef91978; SL_GWPT_Show_Hide_tmp=1; SL_wptGlobTipTmp=1; u_t_0dfbd5c4476a8ffe3f02aca767156e5c=852682a2-c88d-4c34-a81a-23c46d7dcdaf; CNZZDATA1261166255=576782448-1560913678-null%7C1560911895',
    'Referer':
    'http://www.yzntv.com/',
    'User-Agent':
    'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36'
}
r = geturl(url, headers)
#print(r)
html = etree.HTML(r)
#ch=html.xpath('//div[@class="live_list_div"]/@href')
ch = re.findall(r'(http://www.yzntv.com:80/maintab/livel\?cid=.+?)"', r)
cid = re.findall(r'maintab/livel\?cid=(.+?)&', r)
cid = cid[0:5]
ch = ch[0:5]
for i in cid:
    url = 'http://cc.linkinme.com/yztv/' + i
    print(url)
#print(ch)
tv = re.findall(r'tvname" title="(.+?)"', r)
tv = tv[0:5]
ch = dict(zip(tv, ch))
headers2 = {
コード例 #23
0
import os
import string
from requestget import geturl
import requests
import re
from DPL频道列表模板 import lists

list = 'http://bdapp.lntv.cn:8242/api/lntv/living/tv'
headers = {
    'User-Agent':
    'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3761.0 Safari/537.36 Edg/75.0.127.0',
    'Referer': 'http://bdapp.lntv.cn/e/extend/lntv/gt.php',
    'Host': 'bdapp.lntv.cn'
}
r = geturl(list, headers=headers)
#print(r)
p1 = r'http:.+?","'
pattern1 = re.compile(p1)
http = pattern1.findall(r)
p2 = r':"update","name":".+?"'
pattern2 = re.compile(p2)
name = pattern2.findall(r)
p3 = r'name_abbr":".+?"'
pattern3 = re.compile(p3)
name_abbr = pattern3.findall(r)
list = []
name2 = []
#print(name_abbr)
id = []
with open('北斗TV.dpl', 'w', encoding="utf-8") as f:
    f.write('')
コード例 #24
0
    " 广西公共": '5',
    "广西影视": '6',
    "广西国际": '7',
    "精彩广西": '10'
}
#chlist={'广西卫视':'1','广西综艺':'2','广西都市':'3','广西新闻':'4'}
for x, y in chlist.items():
    #url='http://tv.gxtv.cn/Tv-'+chlist[x]+'.html'
    url = 'http://tv.gxtv.cn/TV-' + y + '.html'
    headers = {
        'Referer':
        url,
        'User-Agent':
        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.0 Safari/537.36 Edg/75.0.14'
    }
    r = geturl(url, headers=headers)
    #if x=='广西综艺':
    #print(r)
    n1 = r.find("cid': '") + len("cid': '")
    n2 = r.find("'", n1)
    n3 = r.find("token': '") + len("token': '")
    n4 = r.find("'", n3)
    cid = r[n1:n2]
    token = r[n3:n4]
    #print(cid,token)
    t0 = time.perf_counter()
    rurl = 'http://tv.gxtv.cn/player/?cid=' + cid + '&token=' + token
    t1 = time.perf_counter()
    #print(rurl)
    r2 = geturl(rurl, headers=headers)
    p = re.findall(r'http://.+?m3u8', r2)
コード例 #25
0
ファイル: mgtv.py プロジェクト: kdzm/Channel
    'Dalvik/1.6.0 (Linux; U; Android 8.1.0; QABOX_1 Build/KOT49H)'
}
us = []
texts = []
'''
file=open("C:\\Users\\Administrator\\PycharmProjects\\频道破解\\芒果TV\\mgid.txt","r+",encoding='utf-8')
f=file.read()
id=re.findall('新频道 - http://47.95.172.168/channel/(.+?)\.',f)
for i in id:
    url='http://ott.liveapi.mgtv.com/v1/epg/turnplay/getLivePlayUrlM3u8?platform=3&definition=??&ticket=&buss_id=1000014&device_id=098d061771538d551af94afdadb7e996&mac_id=BC-7F-E8-91-AD-51&uuid=mgtvmac&after_day=1&license===&net_id=&type=3&channel_id='+str(i)+'&version=5.5.115.200.2.DBEI.0.0_Release'
    r=geturl(url,headers=headers)
    if r.find('url')!=-1:
        print(i,url)'''
for x, y in mgtv.items():
    url = 'http://ott.liveapi.mgtv.com/v1/epg/turnplay/getLivePlayUrlM3u8?platform=3&definition=??&ticket=&buss_id=1000014&device_id=098d061771538d551af94afdadb7e996&mac_id=BC-7F-E8-91-AD-51&uuid=mgtvmac&after_day=1&license===&net_id=&type=3&channel_id=' + y + '&version=5.5.115.200.2.DBEI.0.0_Release'
    r = geturl(url, headers=headers)
    u = re.findall('url":"(.+?)"', r)
    text = re.findall('text":"(.+?)"', r)
    texts = texts + text
    us = us + u
d = dict(zip(texts, us))
#print(d)
for z, x in d.items():
    y = x.encode('utf-8').decode('unicode_escape')
    us[us.index(x)] = y
    r2 = geturl(us[us.index(y)], headers=headers)
    playurl = re.findall(r'info":"(.+?)"', r2)
    print(z, playurl)
#file.close()
# http://60.255.48.134:9090/live/chchd.m3u8
# http://60.255.48.134:9090/live/chcdzdy.m3u8
コード例 #26
0
import requests
from requestget import geturl

list = {'cctv1': "119"}
name = list.values()
for x in name:
    url = 'http://live.xocs.ren/nx.php?id=' + x
    r = geturl(url, headers={})
    print(r)