it.toLowerCase()==='set-cookie');
28 | let cookie = setCk?json[setCk].split(';')[0]:'';
29 | // let cookie = setCk?json[setCk]:'';
30 | log('cookie:'+cookie);
31 | rule_fetch_params.headers.Cookie = cookie;
32 | setItem(RULE_CK,cookie);
33 | }
--------------------------------------------------------------------------------
/py/哔哩免嗅.js:
--------------------------------------------------------------------------------
1 | js:
2 | if(/^http/.test(input)){
3 | input = {
4 | jx:1,
5 | url:input,
6 | parse:0
7 | };
8 | }else{
9 | let ids = input.split('_');
10 | let result = {};
11 | let url = 'https://api.bilibili.com/pgc/player/web/playurl?qn=116&ep_id='+ids[0]+'&cid='+ids[1];
12 | let html = request(url);
13 | let jRoot = JSON.parse(html);
14 | if(jRoot['message'] !== 'success'){
15 | print("需要大会员权限才能观看");
16 | input = '';
17 | }else{
18 | let jo = jRoot['result'];
19 | let ja = jo['durl'];
20 | let maxSize = -1;
21 | let position = -1;
22 | ja.forEach(function (tmpJo,i){
23 | if(maxSize < Number(tmpJo['size'])){
24 | maxSize = Number(tmpJo['size'])
25 | position = i;
26 | }
27 | });
28 | let url = '';
29 | if(ja.length > 0){
30 | if(position === -1){
31 | position = 0;
32 | }
33 | url = ja[position]['url'];
34 | }
35 | result["parse"] = 0;
36 | result["playUrl"] = '';
37 | result["url"] = url;
38 | result["header"] = {
39 | "Referer": "https://www.bilibili.com",
40 | "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
41 | };
42 | result["contentType"] = 'video/x-flv';
43 | input = result;
44 | }
45 | }
--------------------------------------------------------------------------------
/py/哔哩推荐.js:
--------------------------------------------------------------------------------
1 | js:
2 | let d = [];
3 | function get_result(url){
4 | let videos = [];
5 | let html = request(url);
6 | let jo = JSON.parse(html);
7 | if(jo['code'] === 0){
8 | let vodList = jo.result?jo.result.list:jo.data.list;
9 | vodList.forEach(function (vod){
10 | let aid = (vod['season_id']+'').trim();
11 | let title = vod['title'].trim();
12 | let img = vod['cover'].trim();
13 | let remark = vod.new_ep?vod['new_ep']['index_show']:vod['index_show'];
14 | videos.push({
15 | "vod_id": aid,
16 | "vod_name": title,
17 | "vod_pic": img,
18 | "vod_remarks": remark
19 | });
20 | });
21 | }
22 | return videos;
23 | }
24 | function get_rank(tid,pg){
25 | return get_result('https://api.bilibili.com/pgc/web/rank/list?season_type='+tid+'&pagesize=20&page='+pg+'&day=3')
26 | }
27 |
28 | function get_rank2(tid,pg){
29 | return get_result('https://api.bilibili.com/pgc/season/rank/web/list?season_type='+tid+'&pagesize=20&page='+pg+'&day=3')
30 | }
31 | function home_video(){
32 | let videos = get_rank(1).slice(0,5);
33 | [4, 2, 5, 3, 7].forEach(function (i){
34 | videos = videos.concat(get_rank2(i).slice(0,5))
35 | });
36 | return videos;
37 | }
38 | VODS = home_video();
--------------------------------------------------------------------------------
/py/哔哩搜索.js:
--------------------------------------------------------------------------------
1 | js:
2 | let url1 = input+'media_bangumi';
3 | let url2 = input+'media_ft';
4 | let html = request(url1);
5 | let msg = JSON.parse(html).message;
6 | if(msg!=='0'){
7 | VODS = [{vod_name:KEY + '➢'+msg,vod_id:'no_data',vod_remarks:'别点,缺少bili_cookie',vod_pic:'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg'}];
8 | }else {
9 | let jo1 = JSON.parse(html).data;
10 | html = request(url2);
11 | let jo2 = JSON.parse(html).data;
12 | let videos = [];
13 | let vodList = [];
14 | if (jo1['numResults'] === 0) {
15 | vodList = jo2['result'];
16 | } else if (jo2['numResults'] === 0) {
17 | vodList = jo1['result'];
18 | } else {
19 | vodList = jo1['result'].concat(jo2['result']);
20 | }
21 | vodList.forEach(function (vod) {
22 | let aid = (vod['season_id'] + '').trim();
23 | let title = KEY + '➢' + vod['title'].trim().replace("", "").replace("", "");
24 | let img = vod['cover'].trim();
25 | let remark = vod['index_show'];
26 | videos.push({
27 | "vod_id": aid,
28 | "vod_name": title,
29 | "vod_pic": img,
30 | "vod_remarks": remark
31 | });
32 | });
33 | VODS = videos;
34 | }
--------------------------------------------------------------------------------
/py/外部更新环境变量.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : 外部更新环境变量.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/12/6
6 |
7 | import requests
8 |
9 |
10 | class Drpy:
11 | def __init__(self, url, username='admin', password='drpy'):
12 | s = requests.session()
13 | data = {
14 | 'username': username,
15 | 'password': password,
16 | }
17 | print(data)
18 | login_api = f'{url.rstrip("/")}/admin/login'
19 | try:
20 | r = s.post(login_api, data=data)
21 | print(r.cookies)
22 | print(r.text)
23 | self.env_api = f'{url.rstrip("/")}/admin/update_env'
24 | self.s = s
25 | print('drpy连接成功')
26 | except:
27 | self.s = None
28 | print('drpy连接失败')
29 |
30 | def update_env(self, key, value):
31 | if not self.s:
32 | exit('drpy未连接,无法进行操作')
33 | else:
34 | data = {
35 | 'key': key,
36 | 'value': value,
37 | }
38 | r = self.s.post(self.env_api, data=data)
39 | jsonData = r.json()
40 | if jsonData.get('code') == 200:
41 | print('修改成功')
42 | print(jsonData['data'])
43 | else:
44 | print('修改失败')
45 |
46 |
47 | if __name__ == '__main__':
48 | drpy = Drpy('http://localhost:5705/')
49 | drpy.update_env('test_env', '测试环境变量')
50 |
--------------------------------------------------------------------------------
/py/奇优搜索.js:
--------------------------------------------------------------------------------
1 | js:
2 | // log(input);
3 | let url=input.split(";")[0];
4 | let d = [];
5 | let body={searchword:input.split(";")[1]};
6 | fetch_params.body=body;
7 | let html = post(url,fetch_params);
8 | // print(html);\
9 | let pdfa = jsp.pdfa;
10 | let pdfh = jsp.pdfh;
11 | let pd = jsp.pd;
12 | let lists = pdfa(html,'ul.stui-vodlist__media&&li');
13 | lists.forEach(function (it){
14 | d.push({
15 | title:pdfh(it,'.title&&Text'),
16 | url:pd(it,'a&&href'),
17 | desc:pdfh(html,'.pic-text&&Text'),
18 | pic_url:pd(html,'.lazyload&&data-original'),
19 | });
20 | });
21 | setResult(d);
--------------------------------------------------------------------------------
/py/学生直播一级.js:
--------------------------------------------------------------------------------
1 | js:
2 | pdfa=jsp.pdfa;
3 | pdfa=jsp.pdfa;
4 | pd=jsp.pd;
5 | let d=[];
6 | log(input);
7 | let html=request(input);
8 | let list=pdfa(html,'.text_list li');
9 | let burl=input.match(/(.*)\/.*?.html/)[1];
10 | log(burl);
11 | MY_URL=burl;
12 | print(list);
13 | list.forEach(function(it){
14 | let title = pdfh(it,'a&&Text');
15 | d.push({
16 | title:title,
17 | desc:pdfh(it,'.date&&Text'),
18 | url:pd(it,'a&&href')+'@@'+title
19 | });
20 | });
21 | setResult(d)
--------------------------------------------------------------------------------
/py/干饭.js:
--------------------------------------------------------------------------------
1 | js:
2 | // cacheUrl = d.getParse(input);
3 | cacheUrl = getParse(input);
4 | // print(cacheUrl);
5 | if(cacheUrl){
6 | input=cacheUrl;
7 | }else{
8 | try {
9 | // let html = fetch([input, {headers:d.headers,timeout:d.timeout,encoding:d.encoding}]);
10 | // let html = fetch(input, {headers:d.headers,timeout:d.timeout,encoding:d.encoding});
11 | let html = fetch(input, fetch_params);
12 | // js = pdfh(html,'.stui-player__video script:eq(0)&&Html');
13 | // print(js);
14 | let ret = html.match(/var player_(.*?)=(.*?))[2];
15 | let url = JSON.parse(ret).url;
16 | if(url.length > 10){
17 | real_url = 'https://player.buyaotou.xyz/?url='+url;
18 | // log('免嗅地址:'+real_url);
19 | // d.saveParse(input,real_url);
20 | saveParse(input,real_url);
21 | input = real_url;
22 | }
23 | }catch (e) {
24 | print('网络请求发生错误:'+e.message);
25 | }
26 | }
--------------------------------------------------------------------------------
/py/干饭.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : 干饭.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/8/28
6 |
7 | import requests
8 | import re
9 | import json
10 | from urllib.parse import urljoin,quote,unquote
11 | import base64
12 |
13 | def lazyParse(input,d):
14 | cacheUrl = d.getParse(input)
15 | print(f'干饭免嗅:cacheUrl:{cacheUrl}')
16 | if cacheUrl:
17 | return cacheUrl
18 | r = requests.get(input, headers=d.headers,timeout=d.timeout)
19 | r.encoding = d.encoding
20 | html = r.text
21 | # print(html)
22 | # js = d.jsp.pdfh(html,'.stui-player__video script:eq(0)&&Html')
23 | # print(js)
24 | try:
25 | ret = re.search('var player_(.*?)=(.*?)<', html, re.M | re.I).groups()[1]
26 | ret = json.loads(ret)
27 | url = ret.get('url','')
28 | if len(url) > 10:
29 | real_url = 'https://player.buyaotou.xyz/?url='+url
30 | d.saveParse(input,real_url)
31 | return real_url
32 | else:
33 | return input
34 | except Exception as e:
35 | print(f'错误:{e}')
36 | return input
--------------------------------------------------------------------------------
/py/批量重命名.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : 批量重命名.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/12/12
6 |
7 | import os
8 |
9 | def main(path):
10 | # base_path = os.path.dirname(os.path.abspath(__file__)) # 当前文件所在目录
11 | # print(base_path)
12 | files = os.listdir(path)
13 | print(files)
14 | for file in files:
15 | if file.endswith('2.js'):
16 | print(file)
17 | os.rename(path+'/'+file,path+'/'+file.replace('2.js','.js'))
18 | elif file.endswith('2[飞].js'):
19 | print(file)
20 | os.rename(path+'/'+file,path+'/'+file.replace('2[飞].js','[飞].js'))
21 |
22 |
23 | if __name__ == '__main__':
24 | path = r'F:\drpy源\js'
25 | main(path)
--------------------------------------------------------------------------------
/py/搜狗免嗅.js:
--------------------------------------------------------------------------------
1 | js:
2 | // fetch_params.withHeaders = 1;
3 | // let data=fetch(input,fetch_params);
4 | // let html = data.body;
5 | print(input);
6 | fetch_params.headers['User-Agent'] = MOBILE_UA;
7 | print(fetch_params);
8 | let html=request(input);
9 | // let rurl = html.match(/window\.open\('(.*?)',/)[1].split('?')[0];
10 | let rurl = html.match(/window\.open\('(.*?)',/)[1];
11 | // print(rurl);
12 | rurl = urlDeal(rurl);
13 | // print(rurl);
14 | // input = rurl;
15 | input = {parse:1,jx:1,url:rurl};
16 | // print(html);
17 |
--------------------------------------------------------------------------------
/py/搜狗搜索.js:
--------------------------------------------------------------------------------
1 | js:
2 | let d=[];
3 | let html = request(input);
4 | // print(html);
5 | let jsonA = JSON.parse(html.match(/INITIAL_STATE.*?({.*});/)[1]);
6 | print(jsonA);
7 | jsonA = jsonA.result.longVideo.results;
8 | jsonA.forEach(function (it){
9 | let name=it.name;
10 | let introduction=it.introduction;
11 | let pic= it.v_picurl;
12 | let url= it.tiny_url;
13 | let zone=it.zone;
14 | let score=it.score||'暂无';
15 | let style=it.style;
16 | if(it.play.item_list){
17 | let r = {};
18 | r.title = name.replace(//,'').replace(//,'');
19 | r.url= 'https://v.sogou.com'+url;
20 | r.desc = it.list_category.join(',');
21 | r.content= introduction;
22 | r.pic_url= pic;
23 | d.push(r);
24 | }
25 | });
26 | // print(d);
27 | setResult(d);
--------------------------------------------------------------------------------
/py/搜狗筛选.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : 搜狗筛选.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/9/11
6 | import requests
7 | from pprint import pprint
8 |
9 | cates = 'teleplay&film&cartoon&tvshow&documentary'.split('&')
10 | urls = [f'https://waptv.sogou.com/napi/video/classlist?abtest=0&iploc=CN1304&spver=&listTab={cate}&filter=&start=0&len=15&fr=filter' for cate in cates]
11 | print(urls)
12 | headers = {'user-agent':'Mozilla/5.0 (Linux; Android 11; M2007J3SC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045714 Mobile Safari/537.36'}
13 |
14 | ft_dict = {}
15 | def getOne(url):
16 | r = requests.get(url, headers=headers)
17 | html = r.json()
18 | filters = html['listData']['list']['filter_list']
19 | cate_id = html['listData']['list']['entity']
20 | ft_dict[cate_id] = []
21 | for i in range(len(filters)):
22 | ft = filters[i]
23 | value = [{"n":"全部","v":""}]
24 | vl = [{"n":i,"v":i} for i in ft['option_list']]
25 | value.extend(vl)
26 | ft_dict[cate_id].append({
27 | 'key':ft['option_name'],
28 | 'name':ft['name'],
29 | 'value':value
30 | })
31 | return ft_dict
32 | # print(ft_dict)
33 | for url in urls:
34 | # print(getOne(urls[0]))
35 | # print(getOne(url))
36 | getOne(url)
37 | print(ft_dict)
--------------------------------------------------------------------------------
/py/搜索一级.js:
--------------------------------------------------------------------------------
1 | js:
2 | let d = [];
3 | let html = request(input);
4 | html = JSON.parse(html);
5 | let list = html.listData.results;
6 | list.forEach(function (it){
7 | let desc1 = it.ipad_play_for_list.finish_episode?it.ipad_play_for_list.episode===it.ipad_play_for_list.finish_episode?"全集"+it.ipad_play_for_list.finish_episode:"连载"+it.ipad_play_for_list.episode+"/"+it.ipad_play_for_list.finish_episode:"";
8 | let desc2 = it.score?'评分:'+it.score:'';
9 | let desc3 = it.date?'更至:'+it.date:'';
10 | d.push({
11 | title: it.name,
12 | img: it.v_picurl,
13 | url: "https://v.sogou.com" + it.url.replace('teleplay', 'series').replace('cartoon', 'series'),
14 | desc: desc1||desc2||desc3,
15 | });
16 | });
17 | setResult(d);
--------------------------------------------------------------------------------
/py/有声小说列表.js:
--------------------------------------------------------------------------------
1 | js:
2 | pd = jsp.pd;
3 | let url=pd(html,".bookbutton&&a&&href");
4 | log(url);
5 | html = request(url);
6 | let v=pd(html,'.booksite&&script&&Html');
7 | var document={};
8 | var VideoListJson;
9 | // log(v);
10 | VideoListJson=eval(v.split('VideoListJson=')[1].split(',urlinfo')[0]);
11 | // 截取剔除eval代码js不兼容的部分 quickjs不支持没定义变量的情况下直接赋值!!!
12 | // v = v.split('VideoListJson=')[1].split(',urlinfo')[0];
13 | // eval(v);
14 | log(typeof(VideoListJson));
15 | let list1=VideoListJson[0][1];
16 | LISTS=[list1];
17 | log(LISTS);
--------------------------------------------------------------------------------
/py/测试注视.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : 测试注释.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/10/20
6 |
7 |
8 | import requests
9 | import ujson
10 |
11 | data = {'album': 'all', 'mcountry': 'all', 'mform': 'all', 'page': '1', 'sort': 'all', 'tag_arr%5B%5D': 'all', 'title': ''}
12 | headers = {
13 | 'Referer': 'https://gaze.run',
14 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 11; M2007J3SC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045714 Mobile Safari/537.36',
15 | # 'cookie': 'PHPSESSID=e7ht5hvema4sg0o8l1o5k0bqt1; Hm_lvt_eebb854b7348edadfb6b433786f5d059=1666239708; Hm_lpvt_eebb854b7348edadfb6b433786f5d059=1666244071',
16 | 'x-requested-with': 'XMLHttpRequest'
17 | }
18 | # form = ujson.dumps(data)
19 | # form = data
20 | # print(form)
21 | form = 'mform=1&mcountry=all&tag_arr%5B%5D=3&page=1&sort=updatetime&album=all&title='
22 | form = 'mform=1&mcountry=all&tag_arr%5B%5D=all&page=1&sort=default&album=all&title='
23 | print(form)
24 | r = requests.post('https://gaze.run/filter_movielist',data=form,headers=headers)
25 | print(r.text)
--------------------------------------------------------------------------------
/py/爱奇艺推荐.js:
--------------------------------------------------------------------------------
1 | js:
2 | let d =[];
3 | // print(input);
4 | // print(HOST);
5 | fetch_params.headers['user-agent'] = PC_UA;
6 | // print(fetch_params);
7 | pdfh = jsp.pdfh;
8 | pdfa = jsp.pdfa;
9 | pd = jsp.pd;
10 | let html = fetch(HOST,fetch_params);
11 | let lists = pdfa(html,'.qy-mod-li');
12 | // print(lists.length);
13 | lists.forEach(function (it){
14 | try {
15 | let title = pdfh(it,'p.sub&&title');
16 | let desc = pdfh(it,'.qy-mod-label&&Text');
17 | let pic_url = pd(it,'img&&src');
18 | d.push({
19 | title:title,
20 | desc:desc,
21 | img:pic_url,
22 | });
23 | }catch(e){
24 | // print(e.message);
25 | }
26 |
27 | });
28 | // print(d);
29 | res = setResult(d);
30 | // print(res);
--------------------------------------------------------------------------------
/py/猫了个咪一级.js:
--------------------------------------------------------------------------------
1 | js:
2 | let d = [];
3 | let bodys = {
4 | "access_token": "",
5 | "cate_id": MY_CATE,
6 | "identifier": "ffffffff-c67a-899b-ffff-ffffef05ac4a",
7 | "page": MY_PAGE,
8 | "region": 0,
9 | "type_id": 0,
10 | "vip": 0,
11 | "year": ""
12 | };
13 | // print(input);
14 | // print(bodys);
15 | var fn = rc('maomi_aes.js');
16 | bodys = fn.En(stringify(bodys));
17 | // print(bodys);
18 | let obj = {
19 | headers: {
20 | 'Content-Type': 'application/x-www-form-urlencoded',
21 | },
22 | method: 'POST',
23 | // body: 'params=' + bodys + '&version=26&sign=' + CryptoJS.MD5('QEBBQADSwrXIXaNqBmMofjfRY/8Sxaxgparams' + bodys + 'version26QEBBQADSwrXIXaNqBmMofjfRY/8Sxaxg')
24 | body: 'params=' + bodys + '&version=26&sign=' + md5('QEBBQADSwrXIXaNqBmMofjfRY/8Sxaxgparams' + bodys + 'version26QEBBQADSwrXIXaNqBmMofjfRY/8Sxaxg')
25 | };
26 | // print(obj);
27 | let api = input.split('#')[0];
28 | let html = JSON.parse(fn.De(request(api, obj)));
29 | // print(html);
30 | html.data.data.forEach(function (it){
31 | d.push({
32 | title:it.name,
33 | img:it.image,
34 | desc:it.rate,
35 | url:api.replace('index','detail')+';'+it.id
36 | });
37 | });
38 | setResult(d);
--------------------------------------------------------------------------------
/py/猫了个咪免嗅.js:
--------------------------------------------------------------------------------
1 | js:
2 | // log(input);
3 | let VID = input.split(';')[1];
4 | let VURL = input.split(';')[0];
5 | var fn = rc('maomi_aes.js');
6 | let url = VURL + '?params='+fn.En('{"id":"' + VID + '"}');
7 | // print(url);
8 | input = JSON.parse(fn.De(request(url))).data.video_item[0].file;
--------------------------------------------------------------------------------
/py/猫了个咪搜索.js:
--------------------------------------------------------------------------------
1 | js:
2 | let bodys = {"keyword":KEY,"page":MY_PAGE};
3 | var fn = rc('maomi_aes.js');
4 | bodys = fn.En(stringify(bodys));
5 | let url = input.split('#')[0];
6 | print(url);
7 | var html = JSON.parse(fn.De(request(url+bodys)));
8 | let d = html.data.data.map(function (data){
9 | return {
10 | title: data.video_name,
11 | img: data.image,
12 | desc:data.rate,
13 | url: 'http://119.28.59.69:8089/api/video/detail?params=;'+fn.En('{"id":"'+data.video_id+'"}'),
14 | }
15 | });
16 | setResult(d);
--------------------------------------------------------------------------------
/py/石榴免嗅.js:
--------------------------------------------------------------------------------
1 | js:
2 | let ep=input.match(/ep=(\d+)/)[1];
3 | let html=request(input);
4 | let jsonA=jsp.pdfh(html,'#__NEXT_DATA__&&Html');
5 | let data=JSON.parse(jsonA).props.pageProps.videoDetail.videoepisode.data;
6 | let realUrl=data.filter(function(it){
7 | return it.episode==ep
8 | })[0].url;
9 | input = realUrl
--------------------------------------------------------------------------------
/py/腾讯搜索.js:
--------------------------------------------------------------------------------
1 | js:
2 | let d = [];
3 | pdfa=jsp.pdfa;pdfh=jsp.pdfh;pd=jsp.pd;
4 | let html = request(input);
5 | let baseList=pdfa(html,'body&&.result_item_v');
6 | baseList.forEach(function(it){
7 | let longText=pdfh(it,'.result_title&&Text');
8 | let shortText=pdfh(it,'.sub&&Text');
9 | let fromTag=pdfh(it,'.result_source&&Text');
10 | let score=pdfh(it,'.result_score&&Text');
11 | let content=pdfh(it,'.desc_text&&Text');
12 | let url=pdfh(it,'.result_title&&a&&href');
13 | // log(url);
14 | let img= pd(it,'.figure_pic&&src');
15 | url='https://node.video.qq.com/x/api/float_vinfo2?cid='+url.match(/.*\/(.*?)\.html/)[1];
16 | log(shortText+'|'+url);
17 | if (fromTag.match(/腾讯/)) {
18 | d.push({
19 | title: longText.split(shortText)[0],
20 | img: img,
21 | url: url,
22 | content:content,
23 | desc:"⭐"+longText.split(shortText)[1]+'-'+shortText+' '+score
24 | });
25 | }
26 | });
27 | setResult(d);
--------------------------------------------------------------------------------
/py/腾讯筛选.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : 腾讯筛选.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/9/25
6 |
7 |
8 | cates = 'choice&tv&movie&variety&cartoon&child&doco'.split('&')
9 | fl_dict = {}
10 |
11 | for cate in cates:
12 | fls = []
13 | fls.append({
14 | 'key':'sort',
15 | 'name':'排序',
16 | 'value':[{'n':'最热','v':'18'},{'n':'最新','v':'19'},{'n':'好评','v':'16'},{'n':'高分好评','v':'21'}],
17 | })
18 | fls.append({
19 | 'key': 'pay',
20 | 'name': '资费',
21 | 'value': [{'n': '全部', 'v': '-1'}, {'n': '免费', 'v': '867'}, {'n': '会员', 'v': '6'}],
22 | })
23 | year_value = [{'n': str(2022-i), 'v': str(2022-i)} for i in range(8)]
24 | year_value = [{'n': '全部', 'v': '-1'}]+year_value
25 | fls.append({
26 | 'key': 'year',
27 | 'name': '年代',
28 | 'value': year_value,
29 | })
30 | fl_dict[cate] = fls
31 | print(fl_dict)
--------------------------------------------------------------------------------
/py/芒果搜索.js:
--------------------------------------------------------------------------------
1 | js:
2 | fetch_params.headers.Referer = 'https://www.mgtv.com';
3 | fetch_params.headers['User-Agent'] = UA;
4 | let d = [];
5 | let html = request(input);
6 | let json = JSON.parse(html);
7 | json.data.contents.forEach(function (data){
8 | if (data.data.sourceList || data.data.yearList) {
9 | let list = data.data.sourceList ? data.data.sourceList : data.data.yearList[0].sourceList;
10 | let desc = '';
11 | list.forEach(function (it){
12 | desc += it.name + '\t';
13 | });
14 | if (list[0].source === 'imgo') {
15 | let img = data.data.pic ? data.data.pic : data.data.yearList[0].pic;
16 | d.push({
17 | title: data.data.title ? data.data.title : data.data.yearList[0].title,
18 | img:img ,
19 | content: data.data.story ? data.data.story : data.data.yearList[0].story,
20 | desc: data.data.playTime,
21 | url: list[0].vid
22 | });
23 | }
24 | }
25 | });
26 | setResult(d);
--------------------------------------------------------------------------------
/py/芒果筛选.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : 芒果筛选.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/9/25
6 |
7 | cates = '2&3&1&50&51&115'.split('&')
8 | fl_dict = {}
9 |
10 | for cate in cates:
11 | fls = []
12 | fls.append({
13 | 'key':'chargeInfo',
14 | 'name':'付费类型',
15 | 'value':[{'n':'全部','v':'all'},{'n':'免费','v':'b1'},{'n':'vip','v':'b2'},{'n':'VIP用券','v':'b3'},{'n':'付费点播','v':'b4'}],
16 | })
17 | fls.append({
18 | 'key': 'sort',
19 | 'name': '排序',
20 | 'value': [{'n': '最新', 'v': 'c1'}, {'n': '最热', 'v': 'c2'}, {'n': '知乎高分', 'v': 'c4'}],
21 | })
22 | year_value = [{'n': str(2022-i), 'v': str(2022-i)} for i in range(19)]
23 | year_value = [{'n': '全部', 'v': 'all'}]+year_value
24 | fls.append({
25 | 'key': 'year',
26 | 'name': '年代',
27 | 'value': year_value,
28 | })
29 | fl_dict[cate] = fls
30 | print(fl_dict)
--------------------------------------------------------------------------------
/py/荐片筛选.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : 荐片筛选.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/10/22
6 |
7 | def getFilters():
8 | fyyear = '全部&2022&2021&2020&2019&2018&2017&2016'.split('&')
9 | fyyeark = '0&101&118&16&7&2&3&22'.split('&')
10 | fysort = '热门&评分&更新'.split('&')
11 | fysortK = 'hot&rating&update'.split('&')
12 | fyclass='0&1&2&3&4'
13 |
14 | fy_dict = {}
15 | for i in fyclass.split('&'):
16 | fy_dict[i] = [{
17 | 'key': 'year',
18 | 'name': '年代',
19 | 'value': [{'n':fyyear[j],'v':fyyeark[j]} for j in range(len(fyyear))]
20 | },{
21 | 'key': 'sort',
22 | 'name': '排序',
23 | 'value': [{'n':fysort[k],'v':fysortK[k]} for k in range(len(fysort))]
24 | }]
25 | print(fy_dict)
26 |
27 | if __name__ == '__main__':
28 | getFilters()
29 |
--------------------------------------------------------------------------------
/py/荐片选集列表.js:
--------------------------------------------------------------------------------
1 | js:
2 | log(TABS);
3 | LISTS=[];
4 | TABS.forEach(function (tab){
5 | if(/边下边播/.test(tab)){
6 | let ftp = html.data.new_ftp_list;
7 | let d = ftp.map(function (it){
8 | return it.title+'$'+(/m3u8/.test(it.url)?play_url+it.url:'tvbox-xg:'+it.url)
9 | });
10 | LISTS.push(d);
11 | }else if(/在线点播/.test(tab)){
12 | let m3u = html.data.new_m3u8_list;
13 | let d=m3u.map(function (it){
14 | return it.title+'$'+(/m3u8/.test(it.url)?play_url+it.url:'tvbox-xg:'+it.url);
15 | });
16 | LISTS.push(d);
17 | }
18 | });
--------------------------------------------------------------------------------
/py/豆瓣测试.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : 豆瓣测试.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/9/16
6 |
7 | import json
8 |
9 | selected_categories = {
10 | "类型": "",
11 | "形式": "",
12 | "地区": ""
13 | }
14 | print(selected_categories)
15 | b = json.dumps(selected_categories, separators=(',', ':'), ensure_ascii=False)
16 | print(b)
--------------------------------------------------------------------------------
/py/通用免嗅.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : 通用免嗅.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/8/28
6 | import requests
7 | import re
8 | import json
9 | from urllib.parse import urljoin,quote,unquote
10 | import base64
11 |
12 | def lazyParse(input,d):
13 | print('通用免嗅:',input)
14 | r = requests.get(input, headers=d.headers,timeout=d.timeout)
15 | r.encoding = d.encoding
16 | html = r.text
17 | # print(html)
18 | # js = jsp.pdfh(html,'.stui-player__video script:eq(0)&&Html')
19 | # print(js)
20 | try:
21 | ret = re.search('var player_(.*?)=(.*?)<', html, re.M | re.I).groups()[1]
22 | ret = json.loads(ret)
23 | url = ret.get('url','')
24 | if len(url) > 10:
25 | if url.find('.m3u8') > -1 or url.find('.mp4') > -1:
26 | return url
27 | elif url.find('http') < 0:
28 | try:
29 | l = unquote(base64.b64decode(url).decode("utf-8"))
30 | print(l)
31 | return l
32 | except Exception as e:
33 | print(f'非url和base64编码:{e}')
34 | return input
35 | else:
36 | return input
37 | except Exception as e:
38 | print(f'错误:{e}')
39 | return input
--------------------------------------------------------------------------------
/py/酷云免嗅.js:
--------------------------------------------------------------------------------
1 | js:
2 | function GetPlayUrl(playUrl) {
3 | let realPlay = {parse:0,url:playUrl};
4 | if (/mgtv|sohu/.test(playUrl)) {
5 | realPlay.headers = {'User-Agent':'Mozilla/5.0'};
6 | } else if (/bili/.test(playUrl)) {
7 | realPlay.headers ={'User-Agent':'Mozilla/5.0','Referer':'https://www.bilibili.com'};
8 | } else if (/ixigua/.test(playUrl)) {
9 | realPlay.headers = {'User-Agent':'Mozilla/5.0','Referer':'https://www.ixigua.com'};
10 | }
11 | return realPlay
12 | }
13 | if (/\.m3u8|\.mp4/.test(input)) {
14 | input={parse:0,url:input};
15 | } else {
16 | try {
17 | let jxUrl = 'http://api.kunyu77.com/api.php/provide/parserUrl?url=';
18 | var t = Math.floor(new Date().getTime() /1000).toString();
19 | let jxExt = "&retryNum=0&pcode=010110002&version=2.1&devid=f9c9ce5bb5827a266829383718e6131a&package=com.sevenVideo.app.android&sys=android&sysver=12&brand=Xiaomi&model=Mi_10_Pro&sj="+t;
20 | let url = jxUrl+input+jxExt;
21 | let TK = "/api.php/provide/parserUrl"+"Xiaomif9c9ce5bb5827a266829383718e6131aMi_10_Procom.sevenVideo.app.android010110002"+0+t+"android12"+ encodeURIComponent(vipUrl) + "2.1"+t+"XSpeUFjJ";
22 | let html = request(url,{headers:{Referer:jxUrl,'User-Agent':'okhttp/3.12.0','TK':md5(TK)}});
23 | let urll = JSON.parse(html).data.url;
24 | let playhtml = request(urll);
25 | let playurl = JSON.parse(playhtml).url;
26 | input = GetPlayUrl(playurl);
27 | }catch (e) {
28 | input = {parse:1,jx:1,url:input};
29 | }
30 | }
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | js2py
2 | pyquery
3 | flask==2.0.3;python_version < '3.7'
4 | flask==2.2.2;python_version >= '3.7'
5 | flask_migrate
6 | flask-sqlalchemy==2.5.1
7 | SQLAlchemy==1.4.40
8 | requests
9 | psutil
10 | # netifaces
11 | # gevent==1.1.2 ; sys_platform != 'win32' and python_version < '3.7'
12 | # gevent==1.3.4 ; sys_platform != 'win32' and python_version >= '3.7' and python_version < '3.9'
13 | # gevent==21.12.0 ; sys_platform == 'win32'
14 | gevent
15 | gunicorn ; python_version >= '3.6'
16 | supervisor ; sys_platform != 'win32'
17 | func_timeout
18 | easydict
19 | jsonpath
20 | quickjs
21 | ujson
22 | Werkzeug==2.2.2
--------------------------------------------------------------------------------
/sources.list:
--------------------------------------------------------------------------------
1 | # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
2 | deb https://mirrors.bfsu.edu.cn/debian/ bullseye main contrib non-free
3 | # deb-src https://mirrors.bfsu.edu.cn/debian/ bullseye main contrib non-free
4 | deb https://mirrors.bfsu.edu.cn/debian/ bullseye-updates main contrib non-free
5 | # deb-src https://mirrors.bfsu.edu.cn/debian/ bullseye-updates main contrib non-free
6 |
7 | deb https://mirrors.bfsu.edu.cn/debian/ bullseye-backports main contrib non-free
8 | # deb-src https://mirrors.bfsu.edu.cn/debian/ bullseye-backports main contrib non-free
9 |
10 | deb https://mirrors.bfsu.edu.cn/debian-security bullseye-security main contrib non-free
11 | # deb-src https://mirrors.bfsu.edu.cn/debian-security bullseye-security main contrib non-free
--------------------------------------------------------------------------------
/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 建立文件夹
3 | mkdir -p /home/pywork/dr_py && cd /home/pywork/dr_py
4 | # 下载仓库包
5 | wget https://ghproxy.net/https://github.com/hjdhnx/dr_py/archive/refs/heads/main.zip -O dr_py.zip
6 | # 解压
7 | unzip dr_py.zip
8 | # 移动文件到当前目录
9 | mv dr*/* ./
10 | # 清理临时文件
11 | rm *.zip
12 | # 启动容器
13 | # docker run -it -p 5705:5705 -p 9001:9001 -v /home/pywork/dr_py:/root/sd/pywork/dr_py --restart=always --name drpy -d hjdhnx/drpy
--------------------------------------------------------------------------------
/static/css/grey.css:
--------------------------------------------------------------------------------
1 | html{
2 | -webkit-filter: grayscale(1);
3 | -moz-filter: grayscale(1);
4 | -ms-filter:grayscale(1);
5 | -o-filter: grayscale(1);
6 | filter: grayscale(1);
7 | }
--------------------------------------------------------------------------------
/static/css/index.css:
--------------------------------------------------------------------------------
1 | .btn{
2 | margin-bottom: 1rem;
3 | border: 1px solid #615e5e;
4 | width: 240px;
5 | height: 30px;
6 | text-align: center;
7 | background-color: #1379cb;
8 | color: #ffffff;
9 | border-radius: 20px;
10 | line-height: 30px;
11 | }
12 |
13 | .btn a{
14 | color: #ffffff;
15 | }
16 |
17 | a {
18 | text-decoration: none;
19 | text-align: center;
20 | line-height: 30px;
21 | }
22 | .jyw{
23 | margin-bottom: 5rem;
24 | }
--------------------------------------------------------------------------------
/static/img/404.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/img/404.jpg
--------------------------------------------------------------------------------
/static/img/check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/img/check.png
--------------------------------------------------------------------------------
/static/img/checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/img/checked.png
--------------------------------------------------------------------------------
/static/img/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/img/icon.png
--------------------------------------------------------------------------------
/static/img/login_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/img/login_background.png
--------------------------------------------------------------------------------
/static/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/img/logo.png
--------------------------------------------------------------------------------
/static/img/logo_drpy1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/img/logo_drpy1.png
--------------------------------------------------------------------------------
/static/img/logo_drpy2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/img/logo_drpy2.png
--------------------------------------------------------------------------------
/static/img/logo_drpy3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/img/logo_drpy3.png
--------------------------------------------------------------------------------
/static/img/yzm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/img/yzm.png
--------------------------------------------------------------------------------
/static/img/豆瓣.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/img/豆瓣.png
--------------------------------------------------------------------------------
/static/js/common.js:
--------------------------------------------------------------------------------
1 | function copy(text,mode){
2 | mode = mode||0;
3 | if(mode === 0){
4 | let el = $('');
5 | $('body').prepend(el); //添加到元素内部的前面
6 | el.val(text); // 修改文本框的内容
7 | el.select(); //选中
8 | console.log('复制的内容:\n'+text);
9 | document.execCommand("copy"); // 执行浏览器复制命令
10 | el.remove();
11 | }else{
12 | let el = $(text);
13 | console.log('复制的内容:\n'+el.val());
14 | el.select(); //选中
15 | document.execCommand("copy"); // 执行浏览器复制命令
16 | }
17 | alert("复制成功");
18 | }
--------------------------------------------------------------------------------
/static/js/dzUtil.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 扩展es6函数 fromEntries
3 | * @param iterable
4 | * @returns {*}
5 | */
6 | Object.fromEntries = function fromEntries (iterable) {
7 | return [...iterable].reduce((obj, [key, val]) => {
8 | obj[key] = val;
9 | return obj;
10 | }, {});
11 | };
12 |
13 | /**
14 | *
15 | * @param url 原始接口链接,支持带参数
16 | * @param params_str 拼接搜索字符串 如 ?a=1&b=2
17 | * @returns {string} 返回拼接后的完整链接,支持带上原始接口链接的hash
18 | */
19 | const buildUrl = function (url,params_str){
20 | const u = new URL(url);
21 | const p = new URLSearchParams(params_str);
22 | const api = u.origin + u.pathname;
23 | let params = Object.fromEntries(u.searchParams.entries());
24 | let params_obj = Object.fromEntries(p.entries());
25 | Object.assign(params,params_obj);
26 | let plist = [];
27 | for(let key in params){
28 | plist.push(key+'='+params[key]);
29 | }
30 | return api + '?' + plist.join('&') + u.hash
31 | };
--------------------------------------------------------------------------------
/static/js/grey.js:
--------------------------------------------------------------------------------
1 | var global_grey = {
2 | '-webkit-filter':'grayscale(1)',
3 | '-moz-filter':'grayscale(1)',
4 | '-ms-filter':'grayscale(1)',
5 | '-o-filter':'grayscale(1)',
6 | 'filter':'grayscale(1)',
7 | };
8 |
9 | function autoGreyByTime(){
10 | let now = new Date();
11 | let now_hours = now.getHours();
12 | // console.log(now_hours,typeof now_hours);
13 | if(now_hours >= 23 || now_hours < 8){
14 | $('html').css(global_grey);
15 | }
16 | }
17 | autoGreyByTime();
18 |
19 | function darkModeHandler() {
20 | const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
21 | if (mediaQuery.matches) {
22 | let color = '#1b1b1b';
23 | $('body').css({"background": color });
24 | }
25 | }
26 | darkModeHandler();
--------------------------------------------------------------------------------
/static/js/jquery.cookie.min.js:
--------------------------------------------------------------------------------
1 | /*! jquery.cookie v1.4.1 | MIT */
2 | !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/asciiarmor/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: ASCII Armor (PGP) mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
24 |
25 |
26 | ASCII Armor (PGP) mode
27 |
36 |
37 |
42 |
43 | MIME types
44 | defined: application/pgp
, application/pgp-encrypted
, application/pgp-keys
, application/pgp-signature
45 |
46 |
47 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/css/gss_test.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function() {
5 | "use strict";
6 |
7 | var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-gss");
8 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "gss"); }
9 |
10 | MT("atComponent",
11 | "[def @component] {",
12 | "[tag foo] {",
13 | " [property color]: [keyword black];",
14 | "}",
15 | "}");
16 |
17 | })();
18 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/cypher/test.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function() {
5 | var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, "cypher");
6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
7 |
8 | MT("unbalancedDoubledQuotedString",
9 | "[string \"a'b\"][variable c]");
10 |
11 | MT("unbalancedSingleQuotedString",
12 | "[string 'a\"b'][variable c]");
13 |
14 | MT("doubleQuotedString",
15 | "[string \"a\"][variable b]");
16 |
17 | MT("singleQuotedString",
18 | "[string 'a'][variable b]");
19 |
20 | MT("single attribute (with content)",
21 | "[node {][atom a:][string 'a'][node }]");
22 |
23 | MT("multiple attribute, singleQuotedString (with content)",
24 | "[node {][atom a:][string 'a'][node ,][atom b:][string 'b'][node }]");
25 |
26 | MT("multiple attribute, doubleQuotedString (with content)",
27 | "[node {][atom a:][string \"a\"][node ,][atom b:][string \"b\"][node }]");
28 |
29 | MT("single attribute (without content)",
30 | "[node {][atom a:][string 'a'][node }]");
31 |
32 | MT("multiple attribute, singleQuotedString (without content)",
33 | "[node {][atom a:][string ''][node ,][atom b:][string ''][node }]");
34 |
35 | MT("multiple attribute, doubleQuotedString (without content)",
36 | "[node {][atom a:][string \"\"][node ,][atom b:][string \"\"][node }]");
37 | })();
38 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/d/test.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function() {
5 | var mode = CodeMirror.getMode({indentUnit: 2}, "d");
6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
7 |
8 | MT("nested_comments",
9 | "[comment /+]","[comment comment]","[comment +/]","[variable void] [variable main](){}");
10 |
11 | })();
12 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/diff/diff.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | CodeMirror.defineMode("diff", function() {
15 |
16 | var TOKEN_NAMES = {
17 | '+': 'positive',
18 | '-': 'negative',
19 | '@': 'meta'
20 | };
21 |
22 | return {
23 | token: function(stream) {
24 | var tw_pos = stream.string.search(/[\t ]+?$/);
25 |
26 | if (!stream.sol() || tw_pos === 0) {
27 | stream.skipToEnd();
28 | return ("error " + (
29 | TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, '');
30 | }
31 |
32 | var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd();
33 |
34 | if (tw_pos === -1) {
35 | stream.skipToEnd();
36 | } else {
37 | stream.pos = tw_pos;
38 | }
39 |
40 | return token_name;
41 | }
42 | };
43 | });
44 |
45 | CodeMirror.defineMIME("text/x-diff", "diff");
46 |
47 | });
48 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/haskell-literate/haskell-literate.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function (mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"), require("../haskell/haskell"))
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror", "../haskell/haskell"], mod)
9 | else // Plain browser env
10 | mod(CodeMirror)
11 | })(function (CodeMirror) {
12 | "use strict"
13 |
14 | CodeMirror.defineMode("haskell-literate", function (config, parserConfig) {
15 | var baseMode = CodeMirror.getMode(config, (parserConfig && parserConfig.base) || "haskell")
16 |
17 | return {
18 | startState: function () {
19 | return {
20 | inCode: false,
21 | baseState: CodeMirror.startState(baseMode)
22 | }
23 | },
24 | token: function (stream, state) {
25 | if (stream.sol()) {
26 | if (state.inCode = stream.eat(">"))
27 | return "meta"
28 | }
29 | if (state.inCode) {
30 | return baseMode.token(stream, state.baseState)
31 | } else {
32 | stream.skipToEnd()
33 | return "comment"
34 | }
35 | },
36 | innerMode: function (state) {
37 | return state.inCode ? {state: state.baseState, mode: baseMode} : null
38 | }
39 | }
40 | }, "haskell")
41 |
42 | CodeMirror.defineMIME("text/x-literate-haskell", "haskell-literate")
43 | });
44 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/http/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: HTTP mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
24 |
25 |
26 | HTTP mode
27 |
28 |
29 |
39 |
40 |
43 |
44 | MIME types defined: message/http
.
45 |
46 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/mbox/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: mbox mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
24 |
25 |
26 | mbox mode
27 |
38 |
41 |
42 | MIME types defined: application/mbox
.
43 |
44 |
45 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/oz/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: Oz mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
26 |
27 |
28 | Oz mode
29 |
50 | MIME type defined: text/x-oz
.
51 |
52 |
59 |
60 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/ruby/test.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function() {
5 | var mode = CodeMirror.getMode({indentUnit: 2}, "ruby");
6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
7 |
8 | MT("divide_equal_operator",
9 | "[variable bar] [operator /=] [variable foo]");
10 |
11 | MT("divide_equal_operator_no_spacing",
12 | "[variable foo][operator /=][number 42]");
13 |
14 | MT("complex_regexp",
15 | "[keyword if] [variable cr] [operator =~] [string-2 /(?: \\( #{][tag RE_NOT][string-2 }\\( | #{][tag RE_NOT_PAR_OR][string-2 }* #{][tag RE_OPA_OR][string-2 } )/][variable x]")
16 |
17 | MT("indented_heredoc",
18 | "[keyword def] [def x]",
19 | " [variable y] [operator =] [string <<-FOO]",
20 | "[string bar]",
21 | "[string FOO]",
22 | "[keyword end]")
23 | })();
24 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/rust/test.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function() {
5 | var mode = CodeMirror.getMode({indentUnit: 4}, "rust");
6 | function MT(name) {test.mode(name, mode, Array.prototype.slice.call(arguments, 1));}
7 |
8 | MT('integer_test',
9 | '[number 123i32]',
10 | '[number 123u32]',
11 | '[number 123_u32]',
12 | '[number 0xff_u8]',
13 | '[number 0o70_i16]',
14 | '[number 0b1111_1111_1001_0000_i32]',
15 | '[number 0usize]');
16 |
17 | MT('float_test',
18 | '[number 123.0f64]',
19 | '[number 0.1f64]',
20 | '[number 0.1f32]',
21 | '[number 12E+99_f64]');
22 |
23 | MT('string-literals-test',
24 | '[string "foo"]',
25 | '[string r"foo"]',
26 | '[string "\\"foo\\""]',
27 | '[string r#""foo""#]',
28 | '[string "foo #\\"# bar"]',
29 |
30 | '[string b"foo"]',
31 | '[string br"foo"]',
32 | '[string b"\\"foo\\""]',
33 | '[string br#""foo""#]',
34 | '[string br##"foo #" bar"##]',
35 |
36 | "[string-2 'h']",
37 | "[string-2 b'h']");
38 |
39 | })();
40 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/solr/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: Solr mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
20 |
33 |
34 |
35 | Solr mode
36 |
37 |
38 |
47 |
48 |
49 |
55 |
56 | MIME types defined: text/x-solr
.
57 |
58 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/spreadsheet/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: Spreadsheet mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
25 |
26 |
27 | Spreadsheet mode
28 |
29 |
30 |
37 |
38 | MIME types defined: text/x-spreadsheet
.
39 |
40 | The Spreadsheet Mode
41 | Created by Robert Plummer
42 |
43 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/tiddlywiki/tiddlywiki.css:
--------------------------------------------------------------------------------
1 | span.cm-underlined {
2 | text-decoration: underline;
3 | }
4 | span.cm-strikethrough {
5 | text-decoration: line-through;
6 | }
7 | span.cm-brace {
8 | color: #170;
9 | font-weight: bold;
10 | }
11 | span.cm-table {
12 | color: blue;
13 | font-weight: bold;
14 | }
15 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/tiki/tiki.css:
--------------------------------------------------------------------------------
1 | .cm-tw-syntaxerror {
2 | color: #FFF;
3 | background-color: #900;
4 | }
5 |
6 | .cm-tw-deleted {
7 | text-decoration: line-through;
8 | }
9 |
10 | .cm-tw-header5 {
11 | font-weight: bold;
12 | }
13 | .cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/
14 | padding-left: 10px;
15 | }
16 |
17 | .cm-tw-box {
18 | border-top-width: 0px !important;
19 | border-style: solid;
20 | border-width: 1px;
21 | border-color: inherit;
22 | }
23 |
24 | .cm-tw-underline {
25 | text-decoration: underline;
26 | }
--------------------------------------------------------------------------------
/static/plugin/codemirror/mode/z80/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: Z80 assembly mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
24 |
25 |
26 | Z80 assembly mode
27 |
28 |
29 |
45 |
46 |
51 |
52 | MIME types defined: text/x-z80
, text/x-ez80
.
53 |
54 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/theme/ambiance-mobile.css:
--------------------------------------------------------------------------------
1 | .cm-s-ambiance.CodeMirror {
2 | -webkit-box-shadow: none;
3 | -moz-box-shadow: none;
4 | box-shadow: none;
5 | }
6 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/theme/bespin.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Bespin
4 | Author: Mozilla / Jan T. Sott
5 |
6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
8 |
9 | */
10 |
11 | .cm-s-bespin.CodeMirror {background: #28211c; color: #9d9b97;}
12 | .cm-s-bespin div.CodeMirror-selected {background: #36312e !important;}
13 | .cm-s-bespin .CodeMirror-gutters {background: #28211c; border-right: 0px;}
14 | .cm-s-bespin .CodeMirror-linenumber {color: #666666;}
15 | .cm-s-bespin .CodeMirror-cursor {border-left: 1px solid #797977 !important;}
16 |
17 | .cm-s-bespin span.cm-comment {color: #937121;}
18 | .cm-s-bespin span.cm-atom {color: #9b859d;}
19 | .cm-s-bespin span.cm-number {color: #9b859d;}
20 |
21 | .cm-s-bespin span.cm-property, .cm-s-bespin span.cm-attribute {color: #54be0d;}
22 | .cm-s-bespin span.cm-keyword {color: #cf6a4c;}
23 | .cm-s-bespin span.cm-string {color: #f9ee98;}
24 |
25 | .cm-s-bespin span.cm-variable {color: #54be0d;}
26 | .cm-s-bespin span.cm-variable-2 {color: #5ea6ea;}
27 | .cm-s-bespin span.cm-def {color: #cf7d34;}
28 | .cm-s-bespin span.cm-error {background: #cf6a4c; color: #797977;}
29 | .cm-s-bespin span.cm-bracket {color: #9d9b97;}
30 | .cm-s-bespin span.cm-tag {color: #cf6a4c;}
31 | .cm-s-bespin span.cm-link {color: #9b859d;}
32 |
33 | .cm-s-bespin .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
34 | .cm-s-bespin .CodeMirror-activeline-background { background: #404040; }
35 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/theme/eclipse.css:
--------------------------------------------------------------------------------
1 | .cm-s-eclipse span.cm-meta { color: #FF1717; }
2 | .cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; }
3 | .cm-s-eclipse span.cm-atom { color: #219; }
4 | .cm-s-eclipse span.cm-number { color: #164; }
5 | .cm-s-eclipse span.cm-def { color: #00f; }
6 | .cm-s-eclipse span.cm-variable { color: black; }
7 | .cm-s-eclipse span.cm-variable-2 { color: #0000C0; }
8 | .cm-s-eclipse span.cm-variable-3, .cm-s-eclipse span.cm-type { color: #0000C0; }
9 | .cm-s-eclipse span.cm-property { color: black; }
10 | .cm-s-eclipse span.cm-operator { color: black; }
11 | .cm-s-eclipse span.cm-comment { color: #3F7F5F; }
12 | .cm-s-eclipse span.cm-string { color: #2A00FF; }
13 | .cm-s-eclipse span.cm-string-2 { color: #f50; }
14 | .cm-s-eclipse span.cm-qualifier { color: #555; }
15 | .cm-s-eclipse span.cm-builtin { color: #30a; }
16 | .cm-s-eclipse span.cm-bracket { color: #cc7; }
17 | .cm-s-eclipse span.cm-tag { color: #170; }
18 | .cm-s-eclipse span.cm-attribute { color: #00c; }
19 | .cm-s-eclipse span.cm-link { color: #219; }
20 | .cm-s-eclipse span.cm-error { color: #f00; }
21 |
22 | .cm-s-eclipse .CodeMirror-activeline-background { background: #e8f2ff; }
23 | .cm-s-eclipse .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
24 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/theme/elegant.css:
--------------------------------------------------------------------------------
1 | .cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom { color: #762; }
2 | .cm-s-elegant span.cm-comment { color: #262; font-style: italic; line-height: 1em; }
3 | .cm-s-elegant span.cm-meta { color: #555; font-style: italic; line-height: 1em; }
4 | .cm-s-elegant span.cm-variable { color: black; }
5 | .cm-s-elegant span.cm-variable-2 { color: #b11; }
6 | .cm-s-elegant span.cm-qualifier { color: #555; }
7 | .cm-s-elegant span.cm-keyword { color: #730; }
8 | .cm-s-elegant span.cm-builtin { color: #30a; }
9 | .cm-s-elegant span.cm-link { color: #762; }
10 | .cm-s-elegant span.cm-error { background-color: #fdd; }
11 |
12 | .cm-s-elegant .CodeMirror-activeline-background { background: #e8f2ff; }
13 | .cm-s-elegant .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
14 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/theme/hopscotch.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Hopscotch
4 | Author: Jan T. Sott
5 |
6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
8 |
9 | */
10 |
11 | .cm-s-hopscotch.CodeMirror {background: #322931; color: #d5d3d5;}
12 | .cm-s-hopscotch div.CodeMirror-selected {background: #433b42 !important;}
13 | .cm-s-hopscotch .CodeMirror-gutters {background: #322931; border-right: 0px;}
14 | .cm-s-hopscotch .CodeMirror-linenumber {color: #797379;}
15 | .cm-s-hopscotch .CodeMirror-cursor {border-left: 1px solid #989498 !important;}
16 |
17 | .cm-s-hopscotch span.cm-comment {color: #b33508;}
18 | .cm-s-hopscotch span.cm-atom {color: #c85e7c;}
19 | .cm-s-hopscotch span.cm-number {color: #c85e7c;}
20 |
21 | .cm-s-hopscotch span.cm-property, .cm-s-hopscotch span.cm-attribute {color: #8fc13e;}
22 | .cm-s-hopscotch span.cm-keyword {color: #dd464c;}
23 | .cm-s-hopscotch span.cm-string {color: #fdcc59;}
24 |
25 | .cm-s-hopscotch span.cm-variable {color: #8fc13e;}
26 | .cm-s-hopscotch span.cm-variable-2 {color: #1290bf;}
27 | .cm-s-hopscotch span.cm-def {color: #fd8b19;}
28 | .cm-s-hopscotch span.cm-error {background: #dd464c; color: #989498;}
29 | .cm-s-hopscotch span.cm-bracket {color: #d5d3d5;}
30 | .cm-s-hopscotch span.cm-tag {color: #dd464c;}
31 | .cm-s-hopscotch span.cm-link {color: #c85e7c;}
32 |
33 | .cm-s-hopscotch .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
34 | .cm-s-hopscotch .CodeMirror-activeline-background { background: #302020; }
35 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/theme/isotope.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Isotope
4 | Author: David Desandro / Jan T. Sott
5 |
6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
8 |
9 | */
10 |
11 | .cm-s-isotope.CodeMirror {background: #000000; color: #e0e0e0;}
12 | .cm-s-isotope div.CodeMirror-selected {background: #404040 !important;}
13 | .cm-s-isotope .CodeMirror-gutters {background: #000000; border-right: 0px;}
14 | .cm-s-isotope .CodeMirror-linenumber {color: #808080;}
15 | .cm-s-isotope .CodeMirror-cursor {border-left: 1px solid #c0c0c0 !important;}
16 |
17 | .cm-s-isotope span.cm-comment {color: #3300ff;}
18 | .cm-s-isotope span.cm-atom {color: #cc00ff;}
19 | .cm-s-isotope span.cm-number {color: #cc00ff;}
20 |
21 | .cm-s-isotope span.cm-property, .cm-s-isotope span.cm-attribute {color: #33ff00;}
22 | .cm-s-isotope span.cm-keyword {color: #ff0000;}
23 | .cm-s-isotope span.cm-string {color: #ff0099;}
24 |
25 | .cm-s-isotope span.cm-variable {color: #33ff00;}
26 | .cm-s-isotope span.cm-variable-2 {color: #0066ff;}
27 | .cm-s-isotope span.cm-def {color: #ff9900;}
28 | .cm-s-isotope span.cm-error {background: #ff0000; color: #c0c0c0;}
29 | .cm-s-isotope span.cm-bracket {color: #e0e0e0;}
30 | .cm-s-isotope span.cm-tag {color: #ff0000;}
31 | .cm-s-isotope span.cm-link {color: #cc00ff;}
32 |
33 | .cm-s-isotope .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
34 | .cm-s-isotope .CodeMirror-activeline-background { background: #202020; }
35 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/theme/neat.css:
--------------------------------------------------------------------------------
1 | .cm-s-neat span.cm-comment { color: #a86; }
2 | .cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; }
3 | .cm-s-neat span.cm-string { color: #a22; }
4 | .cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; }
5 | .cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; }
6 | .cm-s-neat span.cm-variable { color: black; }
7 | .cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; }
8 | .cm-s-neat span.cm-meta { color: #555; }
9 | .cm-s-neat span.cm-link { color: #3a3; }
10 |
11 | .cm-s-neat .CodeMirror-activeline-background { background: #e8f2ff; }
12 | .cm-s-neat .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
13 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/theme/neo.css:
--------------------------------------------------------------------------------
1 | /* neo theme for codemirror */
2 |
3 | /* Color scheme */
4 |
5 | .cm-s-neo.CodeMirror {
6 | background-color:#ffffff;
7 | color:#2e383c;
8 | line-height:1.4375;
9 | }
10 | .cm-s-neo .cm-comment { color:#75787b; }
11 | .cm-s-neo .cm-keyword, .cm-s-neo .cm-property { color:#1d75b3; }
12 | .cm-s-neo .cm-atom,.cm-s-neo .cm-number { color:#75438a; }
13 | .cm-s-neo .cm-node,.cm-s-neo .cm-tag { color:#9c3328; }
14 | .cm-s-neo .cm-string { color:#b35e14; }
15 | .cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier { color:#047d65; }
16 |
17 |
18 | /* Editor styling */
19 |
20 | .cm-s-neo pre {
21 | padding:0;
22 | }
23 |
24 | .cm-s-neo .CodeMirror-gutters {
25 | border:none;
26 | border-right:10px solid transparent;
27 | background-color:transparent;
28 | }
29 |
30 | .cm-s-neo .CodeMirror-linenumber {
31 | padding:0;
32 | color:#e0e2e5;
33 | }
34 |
35 | .cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; }
36 | .cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; }
37 |
38 | .cm-s-neo .CodeMirror-cursor {
39 | width: auto;
40 | border: 0;
41 | background: rgba(155,157,162,0.37);
42 | z-index: 1;
43 | }
44 |
--------------------------------------------------------------------------------
/static/plugin/codemirror/theme/ssms.css:
--------------------------------------------------------------------------------
1 | .cm-s-ssms span.cm-keyword { color: blue; }
2 | .cm-s-ssms span.cm-comment { color: darkgreen; }
3 | .cm-s-ssms span.cm-string { color: red; }
4 | .cm-s-ssms span.cm-def { color: black; }
5 | .cm-s-ssms span.cm-variable { color: black; }
6 | .cm-s-ssms span.cm-variable-2 { color: black; }
7 | .cm-s-ssms span.cm-atom { color: darkgray; }
8 | .cm-s-ssms .CodeMirror-linenumber { color: teal; }
9 | .cm-s-ssms .CodeMirror-activeline-background { background: #ffffff; }
10 | .cm-s-ssms span.cm-string-2 { color: #FF00FF; }
11 | .cm-s-ssms span.cm-operator,
12 | .cm-s-ssms span.cm-bracket,
13 | .cm-s-ssms span.cm-punctuation { color: darkgray; }
14 | .cm-s-ssms .CodeMirror-gutters { border-right: 3px solid #ffee62; background-color: #ffffff; }
15 | .cm-s-ssms div.CodeMirror-selected { background: #ADD6FF; }
16 |
17 |
--------------------------------------------------------------------------------
/static/plugin/layui/css/modules/layer/default/icon-ext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/plugin/layui/css/modules/layer/default/icon-ext.png
--------------------------------------------------------------------------------
/static/plugin/layui/css/modules/layer/default/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/plugin/layui/css/modules/layer/default/icon.png
--------------------------------------------------------------------------------
/static/plugin/layui/css/modules/layer/default/loading-0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/plugin/layui/css/modules/layer/default/loading-0.gif
--------------------------------------------------------------------------------
/static/plugin/layui/css/modules/layer/default/loading-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/plugin/layui/css/modules/layer/default/loading-1.gif
--------------------------------------------------------------------------------
/static/plugin/layui/css/modules/layer/default/loading-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/plugin/layui/css/modules/layer/default/loading-2.gif
--------------------------------------------------------------------------------
/static/plugin/layui/font/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/plugin/layui/font/iconfont.eot
--------------------------------------------------------------------------------
/static/plugin/layui/font/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/plugin/layui/font/iconfont.ttf
--------------------------------------------------------------------------------
/static/plugin/layui/font/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/plugin/layui/font/iconfont.woff
--------------------------------------------------------------------------------
/static/plugin/layui/font/iconfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/static/plugin/layui/font/iconfont.woff2
--------------------------------------------------------------------------------
/super/flask.conf:
--------------------------------------------------------------------------------
1 | [inet_http_server] ; inet (TCP) server disabled by default
2 | port=*:9001 ; (ip_address:port specifier, *:port for all iface)
3 | username=user ; (default is no username (open server))
4 | password=123 ; (default is no password (open server))
5 |
6 | [supervisord]
7 | ;nodaemon=true
8 | logfile=logs/supervisord.log
9 | logfile_maxbytes=50MB
10 | [supervisorctl]
11 | [program:flask_dr_py]
12 | command=python3 app.py ; 被监控的进程路径
13 | ;directory=/root/sd/pywork/dr_py ; 执行前要不要先cd到目录去,一般不用
14 | user=root ;执行者角色
15 | priority=1 ;数字越高,优先级越高
16 | ;numprocs=1 ; 启动几个进程
17 | startsecs=0
18 | autostart=true ; 随着supervisord的启动而启动
19 | autorestart=true ; 自动重启。。当然要选上了
20 | startretries=10 ; 启动失败时的最多重试次数
21 | exitcodes=0 ; 正常退出代码(是说退出代码是这个时就不再重启了吗?待确定)
22 | stopsignal=KILL ; 用来杀死进程的信号
23 | stopwaitsecs=10 ; 发送SIGKILL前的等待时间
24 | redirect_stderr=true ; 重定向stderr到stdout
25 | ;stopasgroup=true ;用于停止进程组,即停止所有通过“uwsgi.ini”配置启动的进程。
26 | ;killasgroup=true ;用于关闭进程组,即关闭所有通过“uwsgi.ini”配置启动的进程。
--------------------------------------------------------------------------------
/super/sflask.conf:
--------------------------------------------------------------------------------
1 | [inet_http_server] ; inet (TCP) server disabled by default
2 | port=*:9001 ; (ip_address:port specifier, *:port for all iface)
3 | username=user ; (default is no username (open server))
4 | password=123 ; (default is no password (open server))
5 |
6 | [supervisord]
7 | ;nodaemon=true
8 | logfile=logs/supervisord.log
9 | logfile_maxbytes=50MB
10 | [supervisorctl]
11 | [program:flask_dr_py]
12 | # command=gunicorn -w 5 --threads=2 -b 0.0.0.0:5705 app:app ;被监控的进程路径
13 | # command=gunicorn -w 5 -b 0.0.0.0:5705 app:app ;被监控的进程路径
14 | # command=gunicorn --worker-class=gevent --worker-connections=1000 -w 5 -b 0.0.0.0:5705 app:app ;被监控的进程路径 worker建议的最大并发数是(2*CPU) +1
15 | command=gunicorn -w 5 --worker-class=sync --preload -b 0.0.0.0:5705 app:app ;被监控的进程路径
16 | ;directory=/root/sd/pywork/dr_py ; 执行前要不要先cd到目录去,一般不用
17 | user=root ;执行者角色
18 | priority=1 ;数字越高,优先级越高
19 | ;numprocs=1 ; 启动几个进程
20 | startsecs=0
21 | autostart=true ; 随着supervisord的启动而启动
22 | autorestart=true ; 自动重启。。当然要选上了
23 | startretries=10 ; 启动失败时的最多重试次数
24 | exitcodes=0 ; 正常退出代码(是说退出代码是这个时就不再重启了吗?待确定)
25 | stopsignal=KILL ; 用来杀死进程的信号
26 | stopwaitsecs=10 ; 发送SIGKILL前的等待时间
27 | redirect_stderr=true ; 重定向stderr到stdout
28 | ;stopasgroup=true ;用于停止进程组,即停止所有通过“uwsgi.ini”配置启动的进程。
29 | ;killasgroup=true ;用于关闭进程组,即关闭所有通过“uwsgi.ini”配置启动的进程。
--------------------------------------------------------------------------------
/super/stermux.conf:
--------------------------------------------------------------------------------
1 | [inet_http_server] ; inet (TCP) server disabled by default
2 | port=*:9001 ; (ip_address:port specifier, *:port for all iface)
3 | username=user ; (default is no username (open server))
4 | password=123 ; (default is no password (open server))
5 |
6 | [supervisord]
7 | ;nodaemon=true
8 | logfile=logs/supervisord.log
9 | logfile_maxbytes=50MB
10 | [supervisorctl]
11 | [program:flask_dr_py]
12 | # command=gunicorn -w 5 --threads=2 -b 0.0.0.0:5705 app:app ;被监控的进程路径
13 | command=gunicorn -w 5 --worker-class=sync --preload -b 0.0.0.0:5705 app:app ;被监控的进程路径
14 | # command=gunicorn --worker-class=gevent --worker-connections=1000 -w 5 app:app ;被监控的进程路径
15 | ;directory=/sdcard/Download/pywork/dr_py ; 执行前要不要先cd到目录去,一般不用
16 | user=u0_a414 ;执行者角色
17 | priority=1 ;数字越高,优先级越高
18 | ;numprocs=1 ; 启动几个进程
19 | startsecs=0
20 | autostart=true ; 随着supervisord的启动而启动
21 | autorestart=true ; 自动重启。。当然要选上了
22 | startretries=10 ; 启动失败时的最多重试次数
23 | exitcodes=0 ; 正常退出代码(是说退出代码是这个时就不再重启了吗?待确定)
24 | stopsignal=KILL ; 用来杀死进程的信号
25 | stopwaitsecs=10 ; 发送SIGKILL前的等待时间
26 | redirect_stderr=true ; 重定向stderr到stdout
27 | ;stopasgroup=true ;用于停止进程组,即停止所有通过“uwsgi.ini”配置启动的进程。
28 | ;killasgroup=true ;用于关闭进程组,即关闭所有通过“uwsgi.ini”配置启动的进程。
--------------------------------------------------------------------------------
/super/termux.conf:
--------------------------------------------------------------------------------
1 | [inet_http_server] ; inet (TCP) server disabled by default
2 | port=*:9001 ; (ip_address:port specifier, *:port for all iface)
3 | username=user ; (default is no username (open server))
4 | password=123 ; (default is no password (open server))
5 |
6 | [supervisord]
7 | ;nodaemon=true
8 | logfile=logs/supervisord.log
9 | logfile_maxbytes=50MB
10 | [supervisorctl]
11 | [program:flask_dr_py]
12 | command=python3 app.py ; 被监控的进程路径
13 | ;directory=/sdcard/Download/pywork/dr_py ; 执行前要不要先cd到目录去,一般不用
14 | user=u0_a414 ;执行者角色
15 | priority=1 ;数字越高,优先级越高
16 | ;numprocs=1 ; 启动几个进程
17 | startsecs=0
18 | autostart=true ; 随着supervisord的启动而启动
19 | autorestart=true ; 自动重启。。当然要选上了
20 | startretries=10 ; 启动失败时的最多重试次数
21 | exitcodes=0 ; 正常退出代码(是说退出代码是这个时就不再重启了吗?待确定)
22 | stopsignal=KILL ; 用来杀死进程的信号
23 | stopwaitsecs=10 ; 发送SIGKILL前的等待时间
24 | redirect_stderr=true ; 重定向stderr到stdout
25 | ;stopasgroup=true ;用于停止进程组,即停止所有通过“uwsgi.ini”配置启动的进程。
26 | ;killasgroup=true ;用于关闭进程组,即关闭所有通过“uwsgi.ini”配置启动的进程。
--------------------------------------------------------------------------------
/templates/cms/mxpro/css/commonUI.css:
--------------------------------------------------------------------------------
1 | a.links{
2 | margin-right: 5px;
3 | }
4 |
5 | .stui-content__thumb .pic iframe{
6 | max-width: 100%;
7 | border-radius: 2px;height:155px;
8 | overflow: hidden;
9 | /*pointer-events: none;*/
10 | }
11 |
12 | .showPhoto {
13 | position: fixed;
14 | top: 0;
15 | left: 0;
16 | width: 100%;
17 | height: 100%;
18 | background: rgba(0, 0, 0, 0.5);
19 | z-index: 99999;
20 | display: flex;
21 | align-items: center;
22 | justify-content: center;
23 | }
24 |
25 | .showPhoto .img {
26 | display: block;
27 | margin: auto 0;
28 | max-width: 100%;
29 | text-align: center;
30 | }
--------------------------------------------------------------------------------
/templates/cms/mxpro/img/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/cms/mxpro/img/back.png
--------------------------------------------------------------------------------
/templates/cms/mxpro/img/help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/cms/mxpro/img/help.png
--------------------------------------------------------------------------------
/templates/cms/mxpro/img/load.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/cms/mxpro/img/load.gif
--------------------------------------------------------------------------------
/templates/cms/mxpro/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/cms/mxpro/img/logo.png
--------------------------------------------------------------------------------
/templates/cms/mxpro/img/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/cms/mxpro/img/play.png
--------------------------------------------------------------------------------
/templates/cms/mxpro/img/show.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/cms/mxpro/img/show.png
--------------------------------------------------------------------------------
/templates/cms/mxpro/js/commonUtil.js:
--------------------------------------------------------------------------------
1 | var commonUtil = {
2 | isVideo(playUrl){
3 | let res_url = playUrl.split('?')[0];
4 | if(playUrl.endsWith('.m3u8')||res_url.endsWith('.m3u8')){
5 | return true
6 | }else if(playUrl.endsWith('.mp4')||res_url.endsWith('.mp4')){
7 | return true
8 | }else if(/\.(m4a|mp3|flv|aac)$/.test(playUrl)||/\.(m4a|mp3|flv|aac)$/.test(res_url)){
9 | return true
10 | }
11 | return false
12 | },
13 | getLocationFromRedirect(
14 | originUrl,
15 | method = "GET"
16 | ){
17 | return new Promise((resolve, reject) => {
18 | const xhr = new XMLHttpRequest();
19 | xhr.open(method, originUrl, true);
20 | xhr.onload = function () {
21 | resolve(xhr.responseURL);
22 | };
23 | xhr.onerror = reject;
24 | xhr.send(null);
25 | })
26 | },
27 | get302UrlResponse(url, callback) {
28 | var xhr = new XMLHttpRequest();
29 | xhr.open('GET', url, true);
30 | xhr.onload = function () {
31 | callback(xhr.responseURL);
32 | }
33 | xhr.send(null);
34 | },
35 | async getRealUrl(url,callback){
36 | const res = await axios.get(`web/302redirect?url=${encodeURIComponent(url)}`);
37 | return callback(res);
38 | }
39 | };
--------------------------------------------------------------------------------
/templates/cms/mxpro/js/mxhtml.js:
--------------------------------------------------------------------------------
1 | function closeclick() {
2 | document.getElementById('note').style.display = 'none';
3 | setSessionStorage("note", 1)
4 | }
5 | function clickclose() {
6 | noteStatus = getSessionStorage('note')
7 | console.log(noteStatus);
8 | if (noteStatus && Number(noteStatus) == 1) {
9 | document.getElementById('note').style.display = 'none';
10 | } else {
11 | document.getElementById('note').style.display = 'block';
12 | }
13 |
14 | }
15 | function setSessionStorage(key, val) {
16 | window.sessionStorage.setItem(key, val);
17 | }
18 | function getSessionStorage(key) {
19 | return window.sessionStorage.getItem(key);
20 | }
21 | // window.onload = clickclose;
--------------------------------------------------------------------------------
/templates/cms/mxpro/js/rich-tf.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | function IsPC() {
3 | var userAgentInfo = window.navigator.userAgent;
4 | var flag = true;
5 | if (userAgentInfo.indexOf('Mobile') != -1 || screen.width <= 750) {
6 | flag = false;
7 | }
8 | return flag;
9 | }
10 | var dom = document.getElementById('richid');
11 | var data = document.getElementById('richid').getAttribute('data')
12 | if (dom) {
13 | if (IsPC()) {
14 | var sp = document.createElement('script');
15 | sp.src = '//pc.stgowan.com/pc_w/m_rich.js';
16 | sp.id = 'richdata';
17 | sp.charset = 'utf-8';
18 | sp.setAttribute('data', data);
19 | if (data=='s=6871'||data=='s=7689'||data=='s=8227') {
20 | window.onload = function () {
21 | document.body.appendChild(sp);
22 | }
23 | } else {
24 | document.body.appendChild(sp);
25 | }
26 | }
27 | }
28 | })()
--------------------------------------------------------------------------------
/templates/player/mui/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/mui/favicon.ico
--------------------------------------------------------------------------------
/templates/player/mui/imges/GEBDGDCAJSP4DhK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/mui/imges/GEBDGDCAJSP4DhK.png
--------------------------------------------------------------------------------
/templates/player/mui/imges/background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/mui/imges/background.jpg
--------------------------------------------------------------------------------
/templates/player/mui/imges/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/mui/imges/loading.gif
--------------------------------------------------------------------------------
/templates/player/mui/js/jquery.xctips.js:
--------------------------------------------------------------------------------
1 | window.xcsoft = window.xcsoft || {};
2 | xcsoft.tipsCss = {
3 | height: "40px",
4 | fontSize: "14px",
5 | top:"82%"
6 | };
7 | xcsoft.tipsHide = xcsoft.tipsShow = "fast";
8 | xcsoft.dom;
9 | xcsoft.timeout;
10 | xcsoft.loading = function(b) {
11 | xcsoft.init(b, 0, "loading", !0)
12 | };
13 | xcsoft.info = function(b, c) {
14 | xcsoft.init(b, c || 2500, "info")
15 | };
16 | xcsoft.error = function(b, c) {
17 | xcsoft.init(b, c || 2E3, "error")
18 | };
19 | xcsoft.success = function(b, c) {
20 | xcsoft.init(b, c || 1500, "success")
21 | };
22 | xcsoft.init = function(b, c, a, d) {
23 | this.tipsHtml(b, a);
24 | $(this.dom).animate({
25 | left: 0,
26 | top:"82%"
27 | }, this.tipsHide);
28 | clearTimeout(this.timeout);
29 | this.timeout = !d && setTimeout(function() {
30 | xcsoft._hide()
31 | }, c)
32 | };
33 | xcsoft._hide = function() {
34 | this.dom.stop().animate({
35 | left: "-" + xcsoft.tipsCss.height
36 | }, this.tipsHide, "", function() {
37 | $(this).remove()
38 | })
39 | };
40 | xcsoft.tipsHtml = function(b, c) {
41 | var a = $(".xctips");
42 | c = c || "info";
43 | 0 == a.length ? (a = document.createElement("div"), a.className = "xctips " + c, this.dom = $(a), this.dom.css(this.tipsCss), a.style.left = "-" + this.tipsCss.height, a.style.height = this.tipsCss.height, a.style.lineHeight = this.tipsCss.height, a.innerHTML = b, $("body").append(this.dom)) : (a.html(b), a.attr("class", "xctips " + c), this.dom = a)
44 | };
--------------------------------------------------------------------------------
/templates/player/p2p-media-loader/images/line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2p-media-loader/images/line.png
--------------------------------------------------------------------------------
/templates/player/p2p-media-loader/images/list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2p-media-loader/images/list.png
--------------------------------------------------------------------------------
/templates/player/p2p-media-loader/images/loading_pc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2p-media-loader/images/loading_pc.jpg
--------------------------------------------------------------------------------
/templates/player/p2p-media-loader/images/loading_wap.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2p-media-loader/images/loading_wap.gif
--------------------------------------------------------------------------------
/templates/player/p2p-media-loader/images/loading_wapx.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2p-media-loader/images/loading_wapx.gif
--------------------------------------------------------------------------------
/templates/player/p2p-media-loader/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2p-media-loader/images/logo.png
--------------------------------------------------------------------------------
/templates/player/p2p-media-loader/images/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2p-media-loader/images/next.png
--------------------------------------------------------------------------------
/templates/player/p2p-media-loader/images/pront.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2p-media-loader/images/pront.png
--------------------------------------------------------------------------------
/templates/player/p2p-media-loader/p2p-media-loader-servers.js:
--------------------------------------------------------------------------------
1 | !function(e) {
2 | // 在线查看流量使用情况: https://klink.tech/
3 | this.trackerAnnounce = [
4 | // "wss://signal.hitv.com",
5 | // "wss://tracker.openwebtorrent.com",
6 | // "wss://tracker.files.fm:7073",
7 | // "ws://tracker.files.fm:7072",
8 | // "wss://open.tube:443/tracker/socket",
9 | // "ws://tracker.sloppyta.co",
10 | "wss://tracker.fastcast.nz",
11 | "wss://peertube.cpy.re",
12 | // BT Tracker 服务器列表
13 | "wss://peertube.cpy.re:443/tracker/socket",
14 | "ws://tracker.files.fm:7072/announce",
15 | "ws://tracker.nighthawk.pw:4201/announce",
16 | ]
17 | }(this);
--------------------------------------------------------------------------------
/templates/player/p2phls/loading_pc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2phls/loading_pc.jpg
--------------------------------------------------------------------------------
/templates/player/p2pplayer/images/line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2pplayer/images/line.png
--------------------------------------------------------------------------------
/templates/player/p2pplayer/images/list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2pplayer/images/list.png
--------------------------------------------------------------------------------
/templates/player/p2pplayer/images/loading_pc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2pplayer/images/loading_pc.jpg
--------------------------------------------------------------------------------
/templates/player/p2pplayer/images/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2pplayer/images/next.png
--------------------------------------------------------------------------------
/templates/player/p2pplayer/images/pront.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/templates/player/p2pplayer/images/pront.png
--------------------------------------------------------------------------------
/test/yzm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/test/yzm.png
--------------------------------------------------------------------------------
/test/yzm1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/test/yzm1.png
--------------------------------------------------------------------------------
/test/测试.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : 测试.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/8/28
6 |
7 | import re
8 | from urllib.parse import quote,unquote
9 | txt = 'var player_aaaa={"flag":"play","encrypt":3,"trysee":0,"points":0,"link":"\/vodplay\/44640-1-1.html","link_next":"","link_pre":"","url":"Zd2fZg56c6y10828ZDRiNzZjNzk1Y2E3OWQzNmQzYWEyM2IwODM0ZjM3MgO0O0OO0O0O","url_next":"d","from":"vip","server":"no","note":"","id":"44640","sid":1,"nid":1}'
10 | ret = re.search('var player_(.*?)=(.*?)<',txt,re.M|re.I)
11 | print(ret)
12 |
13 | def encodeStr(input, encoding='GBK'):
14 | """
15 | 指定字符串编码
16 | :param input:
17 | :param encoding:
18 | :return:
19 | """
20 | return quote(input.encode(encoding, 'ignore'))
21 |
22 | def lazyParse(input,jsp,getParse,saveParse,headers,encoding):
23 | pass
24 | str1 = '星'
25 | key = str1.encode('gb2312','ignore')
26 | print(quote(key))
27 | print(quote(str1))
28 | # print(str1.decode('utf-8',))
29 | # str_gbk = str1.encode("gbk",ignore=True).strip()
30 | # print("转码结果:"+repr(str_gbk))
31 | # print( unquote('%D0%C7','GBK'))
32 | print(encodeStr('星','utf-8'))
33 | print(encodeStr('斗罗大陆','gbk')) # %B6%B7%C2%DE%B4%F3%C2%BD
--------------------------------------------------------------------------------
/txt/help.txt:
--------------------------------------------------------------------------------
1 | service supervisord start #启动,默认配置文件
2 | service supervisord stop #停止
3 | service supervisord status #状态
4 | supervisorctl shutdown #关闭所有任务
5 | supervisorctl stop|start program_name #启动或停止服务
6 | supervisorctl status #查看所有任务状态
7 | kill -9 $(cat supervisord.pid) # 杀掉进程
8 | supervisord -c manager.conf # 启动服务
9 | echo_supervisord_conf > ./cmd.conf #输出配置
--------------------------------------------------------------------------------
/txt/hipy/base_spider.json:
--------------------------------------------------------------------------------
1 | {"分类1": [{"key": "letter", "name": "首字母", "value": [{"n": "A", "v": "A"}, {"n": "B", "v": "B"}]}], "分类2": [{"key": "letter", "name": "首字母", "value": [{"n": "A", "v": "A"}, {"n": "B", "v": "B"}]}, {"key": "year", "name": "年份", "value": [{"n": "2024", "v": "2024"}, {"n": "2023", "v": "2023"}]}]}
--------------------------------------------------------------------------------
/txt/hipy/bidi.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/txt/hipy/bidi.jar
--------------------------------------------------------------------------------
/txt/hipy/test_1.txt:
--------------------------------------------------------------------------------
1 | [{'key':'你好',
2 | 'value':'这是一串代码',
3 | 'tip':'可能会有注释','a':true,"b":None,"c":null,'d':True}]
4 | // 单行注释
5 | # 单行注释
6 |
7 | /*
8 |
9 |
10 | 多行注释
11 | */
12 |
13 | """
14 |
15 | 多行注释
16 | """
17 |
18 |
19 | '''
20 | 多行注释
21 |
22 | '''
--------------------------------------------------------------------------------
/txt/jar/0906.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/txt/jar/0906.jar
--------------------------------------------------------------------------------
/txt/jar/spiders.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/txt/jar/spiders.zip
--------------------------------------------------------------------------------
/txt/js/18/18av.js:
--------------------------------------------------------------------------------
1 | var rule = {
2 | title:'18av',
3 | host:'https://maa1812.com',
4 | url:'/zh/fyclass/all/fypage.html',
5 | headers:{
6 | 'User-Agent':'MOBILE_UA'
7 | },
8 | timeout:5000,
9 | class_name:'最近更新',//静态分类名称拼接
10 | class_url:'chinese_list',//静态分类标识拼接
11 | //class_parse:'ul.animenu__nav&&li;a&&Text;a&&href',
12 | limit:5,
13 | play_parse:true,
14 | lazy:'',
15 | 一级:'.posts&&.video_9s;h3&&Text;img&&src;.meta&&Text;a&&href',
16 | 二级:'*',
17 | }
--------------------------------------------------------------------------------
/txt/js/18/Missav.js:
--------------------------------------------------------------------------------
1 | var rule = {
2 | title:'Missav',
3 | host:'https://missav.com',
4 | searchUrl:'/cn/search/**',
5 | url:'/cn/fyclass?page=fypage',
6 | headers:{
7 | 'User-Agent':'MOBILE_UA'
8 | },
9 | timeout:5000,
10 | class_name:'最近更新&新作上市&无码流出&SIRO&LUXU&GANA&PRESTIGE&S-CUTE&ARA&FC2&麻豆传媒&本月热门',//静态分类名称拼接
11 | class_url:'new&release&uncensored-leak&siro&luxu&gana&maan&scute&ara&fc2&madou&monthly-hot',//静态分类标识拼接
12 | limit:5,
13 | play_parse:true,
14 | lazy:'',
15 | 一级:'.grid.grid-cols-2 div&&a;.lozad.w-full&&alt;.lozad.w-full&&data-src;.absolute.bottom-1&&Text;a&&href',
16 | 二级:'*',
17 | 搜索:'.grid.grid-cols-2 div&&a;.lozad.w-full&&alt;.lozad.w-full&&data-src;.absolute.bottom-1&&Text;a&&href',
18 | searchable:1,//是否启用全局搜索,
19 | quickSearch:1,//是否启用快速搜索,
20 | filterable:0,//是否启用分类筛选,
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/txt/js/18/banan.js:
--------------------------------------------------------------------------------
1 | var rule = {
2 | title:'banan',
3 | host:'https://banan.tv',
4 | url:'/vodtype/fyclass-fypage.html',
5 | headers:{
6 | 'User-Agent':'MOBILE_UA'
7 | },
8 | timeout:5000,
9 | class_name:'探花&91大神&素人&国产&高清&FC2',//静态分类名称拼接
10 | class_url:'57&23&63&25&22&28',//静态分类标识拼接
11 | //class_parse:'ul.navbar-nav&&li:gt(1):lt(6);a&&Text;a&&href',
12 | limit:5,
13 | play_parse:true,
14 | lazy:'',
15 | 一级:'.img-box.cover-md&&a;img&&alt;img&&data-src;.grid_date&&Text;a&&href',
16 | 二级:'*',
17 |
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/txt/js/18/养端.js:
--------------------------------------------------------------------------------
1 | var rule = {
2 | title:'养端',
3 | host:'https://aaq48.com:33666',
4 | homeUrl:'/home/index.html',
5 | url:'/home/vodlist/38/fyclass-fypage.html',
6 | headers:{
7 | 'User-Agent':'MOBILE_UA'
8 | },
9 | searchable:0,
10 | quickSearch:0,
11 | timeout:5000,
12 | class_parse:'.menu&&dl&ⅆa&&Text;a&&href;.*/(.*?)-',
13 | limit:5,
14 | play_parse:true,
15 | lazy:'',
16 | 一级:'.channel-list&&dl;h3&&Text;img&&data-original;font&&Text;a&&href',
17 | 二级:'*',
18 | }
--------------------------------------------------------------------------------
/txt/js/18/吸瓜.js:
--------------------------------------------------------------------------------
1 | var rule = {
2 | title:'吸瓜',
3 | host:'https://xgsp.tv',
4 | // homeUrl:'',
5 | url:'/list/?fyclass-fypage.html',
6 | headers:{
7 | 'User-Agent':'MOBILE_UA'
8 | },
9 | searchable:0,
10 | quickSearch:0,
11 | timeout:5000,
12 | class_parse:'.wap-roll&&li;a&&Text;a&&href;(\\d+).html',
13 | cate_exclude:'独家',
14 | limit:5,
15 | play_parse:true,
16 | lazy:'js:let html=request(input);let a=html.match(/var now="(.*?)"/)[1];input=a',
17 | 推荐:'ul.row.row-space7.row-m-space7.tx-column-5.tx-column-m-2;li;a&&title;img&&src;.ico-right&&Text;a&&href',
18 | double:true,
19 | 一级:'.tx-column-m-2.mb20&&li;h2&&Text;img&&src;.ico-right&&Text;a&&href',
20 | 二级:'*',
21 | }
--------------------------------------------------------------------------------
/txt/js/18/朱古力.js:
--------------------------------------------------------------------------------
1 | var rule = {
2 | title:'朱古力',
3 | host:'https://pigav.com',
4 | url:'/fyclass/page/fypage',
5 | headers:{
6 | 'User-Agent':'MOBILE_UA'
7 | },
8 | timeout:5000,
9 | class_name:'最新&熱門&每日&精選',//静态分类名称拼接
10 | class_url:'最新av線上看&熱門av線上看&每日av線上看線上看&精選av線上看',//静态分类标识拼接
11 | limit:5,
12 | play_parse:true,
13 | lazy:'',
14 | 一级:'.l-post div&&a;a&&title;span&&data-bgsrc;.absolute.bottom-1&&Text;a&&href',
15 | 二级:'*',
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/txt/js/18/玩偶姐姐.js:
--------------------------------------------------------------------------------
1 | var rule = {
2 | title:'玩偶姐姐',
3 | host:'https://hongkongdollvideo.com',
4 | homeUrl:'/latest/',
5 | url:'/fyclass/fypage.html[/fyclass/]',
6 | headers:{
7 | 'User-Agent':'MOBILE_UA'
8 | },
9 | searchable:0,
10 | quickSearch:0,
11 | timeout:5000,
12 | class_parse:'#side-menu:lt(1) li;a&&Text;a&&href;com/(.*?)/',
13 | limit:5,
14 | play_parse:true,
15 | lazy:'',
16 | 一级:'.col-sm-6;h3&&Text;img&&data-src;.date&&Text;a&&href',
17 | 二级:'*',
18 | }
--------------------------------------------------------------------------------
/txt/js/tg/MXONE.jsd:
--------------------------------------------------------------------------------
1 | var rule = Object.assign(muban.mxpro,{
2 | title:'MXONE',
3 | host:'https://www.jpys.me',
4 | url:'vodshow/fyclass--------fypage---.html',
5 | searchUrl:'/vodsearch/**----------fypage---.html/',
6 | class_name:'电影&电视剧&动漫&综艺',
7 | class_url:'1&2&3&4',
8 | class_parse:'',
9 | });
--------------------------------------------------------------------------------
/txt/js/tg/两个BT.jsd:
--------------------------------------------------------------------------------
1 | var rule = {
2 | title:'两个BT',
3 | host:'https://www.bttwoo.com',
4 | // homeUrl:'/',
5 | url:'/fyclass/page/fypage',
6 | searchUrl:'/xssearch?q=**',
7 | searchable:0,
8 | quickSearch:0,
9 | headers:{
10 | 'User-Agent':'UC_UA'
11 | },
12 | timeout:5000,
13 | class_name:'最新电影&国产剧&美剧&日韩剧',//静态分类名称拼接
14 | class_url:'new-movie&zgjun&meiju&jpsrtv',//静态分类标识拼接
15 | class_parse:'',
16 | play_parse:true,
17 | lazy:'',
18 | limit:5,
19 | 推荐:'.leibox;li;.lazy&&alt;.thumb.lazy&&data-original;.jidi span&&Text;a&&href',
20 | double:true, // 推荐内容是否双层定位
21 | 一级:'.bt_img li;.lazy&&alt;.thumb.lazy&&data-original;.jidi span&&Text;a&&href',
22 |
23 | 二级:{"title":".moviedteail_tt h1&&Text","img":".dyimg.fl img&&src","desc":".cr3.starLink&&Text","content":".yp_context&&Text","tabs":".ypxingq_t:eq(1) span","lists":".paly_list_btn:eq(#id) a"},
24 | 搜索:'*',
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/txt/js/tg/剧迷.jsd:
--------------------------------------------------------------------------------
1 | muban.首图.二级.tabs = '.myui-panel__head.bottom-line h3';
2 | var rule = Object.assign(muban.首图,{
3 | title:'剧迷',
4 | host:'https://gmtv1.xyz',
5 | url:'/genre/fyclass---fypage.html',
6 | searchUrl:'/search/-------------.html?wd=*&submit=',
7 | class_name:'电视剧&电影&综艺&动漫',//静态分类名称拼接
8 | class_url:'2&1&3&4',//静态分类标识拼接
9 | class_parse:'',
10 | 一级:'.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
11 | });
12 |
--------------------------------------------------------------------------------
/txt/js/tg/天空影视.jsd:
--------------------------------------------------------------------------------
1 | var rule = Object.assign(muban.首图,{
2 | title:'天空影视',
3 | host:'https://www.tkys6.com',
4 | url:'/vodshow/id/fyclass/page/fypage.html',
5 | searchUrl:'/search/-------------.html?wd=*&submit=',
6 | //class_name:'电视剧&电影&综艺&动漫&blbl',//静态分类名称拼接
7 | //class_url:'2&1&3&4&29',//静态分类标识拼接
8 | class_parse:'.myui-header__menu li.hidden-sm:gt(0):lt(8);a&&Text;a&&href;/(\\d+).html',
9 | });
10 |
--------------------------------------------------------------------------------
/txt/js/tg/快云影院.jsd:
--------------------------------------------------------------------------------
1 | var rule = {
2 | title:'快云',
3 | host:'https://kuaiyunyy.com',
4 | // homeUrl:'/',
5 | url:'/index.php/vod/show/id/fyclass/page/fypage.html',
6 | //searchUrl:'/vodsearch/**----------fypage---.html',
7 | searchable:0,//是否启用全局搜索,
8 | quickSearch:0,//是否启用快速搜索,
9 | filterable:0,//是否启用分类筛选,
10 | headers:{//网站的请求头,完整支持所有的,常带ua和cookies
11 | 'User-Agent':'MOBILE_UA',
12 | // "Cookie": "searchneed=ok"
13 | },
14 | class_parse:'.nav-menu-items&&li;a&&title;a&&href;/(\\d+).html',
15 | cate_exclude:'直播|足球',
16 | play_parse:true,
17 | lazy:'',
18 | limit:8,
19 | 推荐:'.module-items;.module-item-cover&&.module-item-pic;a&&title;.lazyloaded&&data-src;.item-text&&Text;a&&href',
20 | double:true, // 推荐内容是否双层定位
21 | 一级:'.module-list&&.module-item-pic;a&&title;.lazyloaded&&data-src;.module-item-text&&Text;a&&href',
22 | 二级:{"title":"h1.page-title&&Text;.video-info-aux&&Text","img":".lazyload&&data-src","content":".content.vod_content&&Text","tabs":".module-tab-item.tab-item","lists":".module-blocklist.scroll-box:eq(#id) a"},
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/txt/js/tg/爱看电影.jsd:
--------------------------------------------------------------------------------
1 | var rule = {
2 | title:'爱看',
3 | host:'https://ikandy.fun',
4 | // homeUrl:'/',
5 | url:'/vodtype/fyclass-fypage/',
6 | //searchUrl:'/vodsearch/**----------fypage---.html',
7 | searchable:0,//是否启用全局搜索,
8 | quickSearch:0,//是否启用快速搜索,
9 | filterable:0,//是否启用分类筛选,
10 | headers:{//网站的请求头,完整支持所有的,常带ua和cookies
11 | 'User-Agent':'MOBILE_UA',
12 | // "Cookie": "searchneed=ok"
13 | },
14 | class_parse:'.stui-header__menu li.hidden-xs;a&&Text;a&&href;/(\\d+)/',
15 | play_parse:true,
16 | lazy:'',
17 | limit:8,
18 | 推荐:'.stui-vodlist.clearfix;.stui-vodlist__box;a&&title;a&&data-original;.pic-text&&Text;a&&href',
19 | double:true, // 推荐内容是否双层定位
20 | 一级:'.stui-vodlist.clearfix li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
21 | 二级:{"title":"h1.title&&Text;.stui-content__detail p:eq(0)&&Text","img":".lazyload&&src","content":".stui-content__detail p:eq(4)&&Text","tabs":".playlist.mb h3.title","lists":".stui-content__playlist:eq(#id) li"},
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/txt/js/tg/特狗影视.jsd:
--------------------------------------------------------------------------------
1 | var rule = Object.assign(muban.首图,{
2 | title:'特狗',
3 | host:'https://www.tegouys.com',
4 | url:'/vodshow/id/fyclass/page/fypage.html',
5 | searchUrl:'/search/-------------.html?wd=*&submit=',
6 | //class_name:'电视剧&电影&综艺&动漫',//静态分类名称拼接
7 | //class_url:'2&1&3&4',//静态分类标识拼接
8 | class_parse:'.myui-header__menu li.hidden-sm:gt(0):lt(5);a&&Text;a&&href;/(\\d+).html',
9 |
10 | });
11 |
--------------------------------------------------------------------------------
/txt/js/tg/皮皮泡.jsd:
--------------------------------------------------------------------------------
1 | muban.首图2.二级.tabs = '.stui-pannel__head.bottom-line.active.clearfix h3';
2 | var rule = Object.assign(muban.首图2,{
3 | title:'皮皮泡',
4 | host:'https://www.pipipao.com',
5 | url:'/vodshow/id/fyclass/page/fypage.html',
6 | searchUrl:'/vodsearch**/page/fypage.html',
7 | class_name:'电视剧&电影&综艺&动漫&纪录片',//静态分类名称拼接
8 | class_url:'dianshiju&dianying&zongyi&dongman&jilupian',//静态分类标识拼接
9 | class_parse:' ',
10 | 搜索:'ul.stui-vodlist__media&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
11 | });
--------------------------------------------------------------------------------
/txt/js/tg/胖虎影视.jsd:
--------------------------------------------------------------------------------
1 | var rule = Object.assign(muban.mxpro,{
2 | title:'胖虎影视.',
3 | host:'http://panghuys.com',
4 | url:'/vodshow/fyclass/page/fypage.html',
5 | searchUrl:'/search-**----------fypage---/',
6 | class_parse:'.navbar-items li:gt(1):lt(7);a&&Text;a&&href;/(\\d+).html',
7 | });
8 |
--------------------------------------------------------------------------------
/txt/json/alist.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "🙋丫仙女",
4 | "server": "http://alist.xiaoya.pro/",
5 | "startPage": "/",
6 | "showAll": false,
7 | "search": true,
8 | "headers": {
9 | "Authorization": ""
10 | },
11 | "params": {
12 | "/abc": {
13 | "password": "123"
14 | },
15 | "/abc/abc": {
16 | "password": "123"
17 | }
18 | }
19 | },
20 | {
21 | "name": "🐋一只鱼",
22 | "server": "https://alist.youte.ml"
23 | },
24 | {
25 | "name": "🌊七米蓝",
26 | "server": "https://al.chirmyram.com"
27 | },
28 | {
29 | "name": "🐉神族九帝",
30 | "server": "https://alist.shenzjd.com"
31 | },
32 | {
33 | "name": "☃️姬路白雪",
34 | "server": "https://pan.jlbx.xyz"
35 | },
36 | {
37 | "name": "✨星梦",
38 | "server": "https://pan.bashroot.top"
39 | },
40 | {
41 | "name": "💢repl",
42 | "server": "https://ali.liucn.repl.co"
43 | },
44 | {
45 | "name": "💦讯维云盘",
46 | "server": "https://pan.xwbeta.com"
47 | }
48 | ]
49 |
--------------------------------------------------------------------------------
/txt/json/live2mv_data.json:
--------------------------------------------------------------------------------
1 | [
2 | {"name": "甜蜜", "url": "http://zdir.kebedd69.repl.co/public/live.txt"},
3 | {"name": "俊于", "url": "http://home.jundie.top:81/Cat/tv/live.txt"},
4 | {"name": "菜妮丝", "url": "http://xn--ihqu10cn4c.xn--z7x900a.love:63/TV/tvzb.txt"},
5 | {"name": "布里m3u", "url": "http://jiexi.bulisite.top/m3u.php"},
6 | {"name": "吾爱", "url": "http://52bsj.vip:81/api/v3/file/get/763/live.txt?sign=87BTGT1_6AOry7FPwy_uuxFTv2Wcb9aDMj46rDdRTD8%3D%3A0"},
7 | {"name": "饭太硬", "url": "http://ftyyy.tk/live.txt"}
8 | ]
9 |
--------------------------------------------------------------------------------
/txt/json/sniffer.json:
--------------------------------------------------------------------------------
1 | [{
2 | "host": "https://www.ikandy.fun",
3 | "manual": "1",
4 | "format": ".mp4#.m3u8#.flv",
5 | "filters": ".html#=http"
6 | },{
7 | "host": "https://czspp.com",
8 | "manual": "1",
9 | "format": ".mp4#.m3u8#.flv",
10 | "filters": ".html#=http"
11 | },{
12 | "host": "yanetflix.com",
13 | "manual": "1",
14 | "format": ".mp4#.m3u8#.flv",
15 | "filters": ".html#=http"
16 | }]
--------------------------------------------------------------------------------
/txt/libs.txt:
--------------------------------------------------------------------------------
1 | gevent-websocket
2 | PyExecJS
3 | ddddocr
4 | asgiref ; python_version >= '3.6'
5 | parsel # 不知道对比pyquery性能如何,也是css选择器,不好封装成pdfa
6 | netifaces # arm64装不上
--------------------------------------------------------------------------------
/txt/muban/adb调试相关.bash:
--------------------------------------------------------------------------------
1 | # 需要cmder
2 | adb connect 192.168.10.192
3 | adb devices -l
4 | adb logcat -c
5 | adb logcat | grep -i QuickJS
--------------------------------------------------------------------------------
/txt/muban/nodejs_urljoin.js:
--------------------------------------------------------------------------------
1 | const url = require('url');
2 | let a = url.resolve('http://example.com/one', '/two');
3 | let b = url.resolve('http://example.com/one', 'http://www.baidu.com');
4 | console.log(a);
5 | console.log(b);
--------------------------------------------------------------------------------
/txt/muban/海阔urljoin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/txt/muban/海阔urljoin.png
--------------------------------------------------------------------------------
/txt/supervisord.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Supervisor daemon
3 |
4 | [Service]
5 | Type=forking
6 | ExecStart=/usr/bin/supervisord -c /root/sd/pywork/dr_py/manager.conf # 启动命令
7 | ExecStop=/usr/bin/supervisorctl shutdown # 停止程序的命令
8 | ExecReload=/usr/bin/supervisorctl reload # 重启进程的命令
9 | KillMode=process
10 | Restart=on-failure
11 | RestartSec=42s
12 |
13 | [Install]
14 | WantedBy=multi-user.target
--------------------------------------------------------------------------------
/utils/cfg.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : cfg.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/9/10
6 |
7 | from werkzeug.utils import import_string
8 | from base import config
9 | from easydict import EasyDict as edict
10 |
11 | def get_conf(obj):
12 | new_conf = {}
13 | if isinstance(obj, str):
14 | obj = import_string(obj)
15 | for key in dir(obj):
16 | if key.isupper():
17 | new_conf[key] = getattr(obj, key)
18 | return new_conf
19 |
20 | cfg = edict(get_conf(config))
--------------------------------------------------------------------------------
/utils/env.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : env.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/11/21
6 |
7 | from utils.cfg import cfg
8 | import ujson
9 | from controllers.service import storage_service
10 |
11 | def get_env():
12 | new_conf = cfg
13 | lsg = storage_service()
14 | store_conf_dict = lsg.getStoreConfDict()
15 | new_conf.update(store_conf_dict)
16 | # print(new_conf)
17 | env = {
18 | 'ali_token': new_conf.ALI_TOKEN,
19 | 'js_proxy':new_conf.JS_PROXY,
20 | 'fl':'{{fl}}' # 防止被依赖代理
21 | }
22 | ENV = new_conf.ENV.strip()
23 | if ENV:
24 | # print(ENV)
25 | try:
26 | ENV = ujson.loads(ENV)
27 | except Exception as e:
28 | print(f'自定义环境变量有误,不是合法json:{e}')
29 | ENV = {}
30 | if ENV:
31 | env.update(ENV)
32 | # print(env)
33 | return env
34 |
35 | def update_env(env_key:str,env_value:str):
36 | lsg = storage_service()
37 | env = lsg.getItem('ENV')
38 | ENV = {}
39 | try:
40 | ENV = ujson.loads(env)
41 | except:
42 | env = '{}'
43 | if env_key:
44 | ENV[env_key] = env_value
45 | new_env = ujson.dumps(ENV,ensure_ascii=False)
46 | print(new_env)
47 | lsg.setItem('ENV',new_env)
48 | return ENV
--------------------------------------------------------------------------------
/utils/error.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : error.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/8/25
6 |
7 | def failed(msg):
8 | return {
9 | 'msg':msg,
10 | 'code':404,
11 | }
12 |
13 | def success(msg):
14 | return {
15 | 'msg':msg,
16 | 'code':200,
17 | }
--------------------------------------------------------------------------------
/utils/render.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : render.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2023/4/19
6 |
7 | import re
8 | from jinja2 import Environment, Template
9 |
10 |
11 | def to_lower_camel_case(x):
12 | """转小驼峰法命名:下划线转驼峰且首字母小写"""
13 | s = re.sub('_([a-zA-Z])', lambda m: (m.group(1).upper()), x)
14 | return s[0].lower() + s[1:]
15 |
16 |
17 | def render_template_string(source: str, **context):
18 | # 构造环境
19 | env = Environment()
20 | # 添加一个过滤器
21 | env.filters['to_lower_camel_case'] = to_lower_camel_case
22 | # 获取模板
23 | template: Template = env.from_string(source)
24 | # 渲染
25 | view = template.render(**context)
26 | return view
27 |
--------------------------------------------------------------------------------
/utils/ua.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # File : ua.py
4 | # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
5 | # Date : 2022/9/19
6 | from time import time
7 |
8 | MOBILE_UA = 'Mozilla/5.0 (Linux; Android 11; M2007J3SC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045714 Mobile Safari/537.36'
9 | PC_UA = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36'
10 | UA = 'Mozilla/5.0'
11 | UC_UA = 'Mozilla/5.0 (Linux; U; Android 9; zh-CN; MI 9 Build/PKQ1.181121.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.5.5.1035 Mobile Safari/537.36'
12 | IOS_UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'
13 | headers = {
14 | 'Referer': 'https://www.baidu.com',
15 | 'user-agent': UA,
16 | }
17 |
18 | def get_interval(t):
19 | interval = time() - t
20 | interval = round(interval*1000,2)
21 | return interval
22 |
23 | def getHeaders(url):
24 | headers = {}
25 | if url:
26 | headers["Referer"] = url
27 | headers["User-Agent"] = UA
28 | # headers.setdefault("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9")
29 | # headers.setdefault("Accept-Language", "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2")
30 | return headers
--------------------------------------------------------------------------------
/whl/gevent-21.12.0-cp37-cp37m-linux_armv7l.whl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/whl/gevent-21.12.0-cp37-cp37m-linux_armv7l.whl
--------------------------------------------------------------------------------
/whl/gevent-21.12.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/whl/gevent-21.12.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
--------------------------------------------------------------------------------
/whl/quickjs-1.19.2-cp37-cp37m-linux_armv7l.whl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/whl/quickjs-1.19.2-cp37-cp37m-linux_armv7l.whl
--------------------------------------------------------------------------------
/zhengban/AcFun.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import re
3 | import json
4 |
5 |
6 | class AcFun:
7 | def __init__(self, url):
8 | self.url = url
9 | self.headers = {
10 | "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36¬"
11 | }
12 |
13 | def start(self):
14 | res = requests.get(self.url, headers=self.headers)
15 | json_info = json.loads(re.findall("window.pageInfo =(.*?);", res.text)[0].split("=", 1)[-1].strip())
16 | print(json_info)
17 | return json_info
18 |
19 |
20 | if __name__ == '__main__':
21 | AcFun().start()
22 |
--------------------------------------------------------------------------------
/zhengban/DouYu.py:
--------------------------------------------------------------------------------
1 | import execjs
2 | import requests
3 | import re
4 | import time
5 |
6 |
7 | class DouYu:
8 | def __init__(self, room_id):
9 | self.room_id = room_id
10 | self.int_time = int(time.time())
11 | self.did = "3966acse00dd10qer895bdca00031601"
12 |
13 | def get_ub98484234(self):
14 | res = requests.get(f"https://www.douyu.com/{self.room_id}").text
15 | ub98484234 = re.findall("(function ub98484234.*?})var", res)[0]
16 | var = re.findall("var\sv\s=\s(.*?)[.]slice", ub98484234)[0]
17 | var1 = re.findall(f"(var {var}=.*?);", res)[0]
18 | return f"var CryptoJS = require('crypto-js');{var1};{ub98484234}"
19 |
20 | def get_sign(self):
21 | js = execjs.compile(self.get_ub98484234())
22 | res = js.call("ub98484234", self.room_id, self.did, self.int_time)
23 | return res.split("sign=")[-1]
24 |
25 | def get_params(self):
26 | return {
27 | 'v': f'2201{time.strftime("%Y%m%d", time.localtime())}',
28 | 'did': self.did,
29 | 'tt': self.int_time,
30 | 'sign': self.get_sign(),
31 | 'cdn': "tct-h5",
32 | 'rate': '0',
33 | 'ver': 'Douyu_221041305',
34 | 'iar': '0',
35 | 'ive': '1',
36 | 'hevc': '0',
37 | 'fa': '1',
38 | }
39 |
40 | def start(self):
41 | res = requests.post(f"https://www.douyu.com/lapi/live/getH5Play/{self.room_id}", data=self.get_params()).json()
42 | print(res)
43 |
44 |
45 | if __name__ == '__main__':
46 | DouYu().start()
47 |
--------------------------------------------------------------------------------
/zhengban/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | Copyright © 2021 jym66
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 |
6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 |
8 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/zhengban/bilibili.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import re
3 |
4 |
5 | class Bili:
6 | def __init__(self, url):
7 | self.url = url
8 | self.headers = {
9 | "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36¬"
10 | }
11 |
12 | def start(self):
13 | res = requests.get(self.url)
14 | result = re.findall("window.__playinfo__=(.*?)", res.text)
15 | print(result[0])
16 | return result[0]
17 |
18 |
19 | if __name__ == '__main__':
20 | Bili().start()
21 |
--------------------------------------------------------------------------------
/zhengban/douyin.py:
--------------------------------------------------------------------------------
1 | import requests
2 |
3 |
4 | class DouYin:
5 | def __init__(self, url):
6 | self.url = url
7 | self.headers = {
8 |
9 | "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) "
10 | "Chrome/89.0.4389.114 Safari/537.36 "
11 | }
12 |
13 | def get_mid(self):
14 | res = requests.get(self.url, headers=self.headers)
15 | return res.url.split("/", 6)[-2]
16 |
17 | def start(self):
18 | url = f"https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids={self.get_mid()}"
19 | res = requests.get(url, headers=self.headers)
20 | print(res.json())
21 | return res.json()
22 |
23 |
24 | if __name__ == '__main__':
25 | DouYin().start()
26 |
--------------------------------------------------------------------------------
/zhengban/douyin_live.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import re
3 |
4 |
5 | class douYinLive:
6 | def __init__(self, url):
7 | self.url = url
8 | self.headers = {
9 | "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36¬"
10 | }
11 |
12 | def parse(self, html):
13 | return re.findall('flv_pull_url":(.*?})', html)[0]
14 |
15 | def start(self):
16 | res = requests.get(self.url, headers=self.headers)
17 | print(self.parse(res.text))
18 |
19 |
20 | if __name__ == '__main__':
21 | douYinLive().start()
22 |
--------------------------------------------------------------------------------
/zhengban/haokan.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import re
3 | import json
4 |
5 |
6 | class haokan:
7 | def __init__(self, url):
8 | self.url = url
9 | self.headers = {
10 | "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36¬",
11 | }
12 |
13 | def getJson(self, text):
14 | res = re.findall("PRELOADED_STATE__\s=\s(.*?);", text)[0]
15 | res = json.loads(res)
16 | return res
17 |
18 | def start(self):
19 | res = requests.get(self.url, headers=self.headers).text
20 | return self.getJson(res)
21 |
22 |
23 | if __name__ == '__main__':
24 | haokan().start()
25 |
--------------------------------------------------------------------------------
/zhengban/huya.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import re
3 | from base64 import b64decode
4 | import json
5 |
6 |
7 | class huya:
8 | def __init__(self, url):
9 | self.url = url
10 |
11 | def decodeStream(self, stream):
12 | return b64decode(stream).decode()
13 |
14 | def start(self):
15 | res = requests.get(self.url).text
16 | hyplay = re.findall('hyPlayerConfig\s=\s(.*?});', res, re.S)
17 | stream = json.loads(self.decodeStream(eval(hyplay[0])['stream']).replace("amp;", ""))
18 | print(stream)
19 | return stream
20 |
21 |
22 | if __name__ == '__main__':
23 | huya().start()
24 |
--------------------------------------------------------------------------------
/zhengban/js/tx-ckey.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kingfren/dr_py/ca23ffdbf5e429c5893ac60158668fc5af7af192/zhengban/js/tx-ckey.wasm
--------------------------------------------------------------------------------
/zhengban/ke_qq.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import re
3 |
4 |
5 | class KeQq:
6 | def __init__(self, url):
7 | self.url = url
8 | self.headers = {
9 | "Referer": "https://ke.qq.com/",
10 | "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36¬",
11 | "Cookie": ""
12 | }
13 | self.taid = re.findall("taid=(\d+)", self.url)[0]
14 | self.vid = ""
15 |
16 | def getParams(self):
17 | vid = re.findall("vid=(\d+)", self.url)
18 | if vid:
19 | return self.url.split("#")[0].split("/")[-1], vid[0]
20 | html = requests.get(self.url, headers=self.headers)
21 | params = re.findall(f"data-tid=(\d+)\sdata-taid={self.taid}\sdata-vid=(\d+)", html.text)
22 | return params[0]
23 |
24 | def getSign(self):
25 | term_id, fileId = self.getParams()
26 | self.vid = fileId
27 | res = requests.get("https://ke.qq.com/cgi-bin/qcloud/get_token", params={"term_id": term_id, "fileId": fileId},
28 | headers=self.headers).json()
29 | return res["result"]
30 |
31 | def start(self):
32 | params = self.getSign()
33 | res = requests.get(f"https://playvideo.qcloud.com/getplayinfo/v2/1258712167/{self.vid}",
34 | params=params, headers=self.headers)
35 | print(res.text)
36 | return res.json()
37 |
38 |
39 | if __name__ == '__main__':
40 | KeQq("").start()
41 |
--------------------------------------------------------------------------------
/zhengban/kuaishou.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import re
3 |
4 |
5 | class kuaishou:
6 | def __init__(self, url):
7 | self.url = url
8 | self.headers = {
9 | "User-Agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Mobile Safari/537.36",
10 | "Referer": self.url
11 | }
12 |
13 | def start(self):
14 | json_data = requests.get(self.url, headers=self.headers, allow_redirects=True).text
15 | res = re.findall('type="video/mp4" src="(.*?)"', json_data)[0]
16 | print(res)
17 | return res
18 |
19 |
20 | if __name__ == '__main__':
21 | kuaishou().start()
22 |
--------------------------------------------------------------------------------
/zhengban/kugou.py:
--------------------------------------------------------------------------------
1 | import requests
2 |
3 |
4 | class KuGou:
5 | def __init__(self, url):
6 | self.url = url
7 | self.headers = {
8 | "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36¬"
9 | }
10 | self.base = url.split("#")[-1].split("&")
11 | self.hash = self.base[0].split("=")[-1]
12 | self.album_id = self.base[1].split("=")[-1]
13 |
14 | def start(self):
15 | params = {
16 | "r": "play/getdata",
17 | "hash": self.hash,
18 | "album_id": self.album_id,
19 | "mid": "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456"
20 | }
21 | res = requests.get("https://wwwapi.kugou.com/yy/index.php?", params=params, headers=self.headers)
22 | print(res.json())
23 | return res.json()
24 |
25 |
26 | if __name__ == '__main__':
27 | KuGou().start()
28 |
--------------------------------------------------------------------------------
/zhengban/sohu.py:
--------------------------------------------------------------------------------
1 | import requests
2 |
3 | import re
4 |
5 |
6 | class sohu:
7 | def __init__(self, url):
8 | self.url = url
9 | self.headers = {
10 | "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36¬"
11 | }
12 |
13 | def get_vid(self):
14 | res = requests.get(self.url, headers=self.headers)
15 | vid = re.findall('var vid="(\d+)";', res.text)
16 | if len(vid) > 0:
17 | return vid[0]
18 | return re.findall('data-vid="(\d+)"', res.text)[0]
19 |
20 | def start(self):
21 | params = {
22 | "vid": self.get_vid(),
23 | "ver": "21",
24 | "ssl": "1",
25 | "pflag": "pch5",
26 | }
27 | res = requests.get("https://hot.vrs.sohu.com/vrs_flash.action", params=params, headers=self.headers)
28 | return res.json()
29 |
30 |
31 | if __name__ == '__main__':
32 | sohu().start()
33 |
--------------------------------------------------------------------------------
/zhengban/xigua.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import execjs
3 | import re
4 |
5 |
6 | class xigua:
7 | def __init__(self, url):
8 | self.url = url
9 | if "wid_try=1" not in self.url:
10 | self.url = self.url + "&wid_try=1"
11 | self.headers = {
12 | "referer": self.url,
13 | "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36",
14 | }
15 | self.nonce = self.getNonce()
16 |
17 | def getNonce(self):
18 | res = requests.get(self.url, headers=self.headers)
19 | return res.cookies.get("__ac_nonce")
20 |
21 | def getSign(self):
22 | jscode = execjs.compile(open("./js/xigua.js").read())
23 | ctx = jscode.call("getSign", self.nonce, self.url)
24 | return f"__ac_nonce={self.nonce};__ac_signature={ctx};__ac_referer={self.url}"
25 |
26 | def start(self):
27 | self.headers.update({"cookie": self.getSign()})
28 | html = requests.get(self.url, headers=self.headers)
29 | res = re.findall("window._SSR_HYDRATED_DATA=(.*?)", html.text)[0].replace("undefined", 'null')
30 | print(res)
31 | return res
32 |
33 |
34 | if __name__ == '__main__':
35 | xigua().start()
36 |
--------------------------------------------------------------------------------