Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
逆着光、寻觅
dr_py
提交
787a1389
dr_py
项目概览
逆着光、寻觅
/
dr_py
与 Fork 源项目一致
Fork自
晚风拂柳颜 / dr_py
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
dr_py
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
787a1389
编写于
11月 25, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复py厂长,js的无法修
上级
e2c71455
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
94 addition
and
35 deletion
+94
-35
js/version.txt
js/version.txt
+1
-1
js/厂长资源.js
js/厂长资源.js
+7
-3
py/厂长预处理.js
py/厂长预处理.js
+34
-0
readme.md
readme.md
+1
-0
txt/py/py_czspp.py
txt/py/py_czspp.py
+51
-31
未找到文件。
js/version.txt
浏览文件 @
787a1389
3.9.24beta5
\ No newline at end of file
3.9.24beta6
\ No newline at end of file
js/厂长资源.js
浏览文件 @
787a1389
var
rule
=
{
title
:
'
厂长资源
'
,
host
:
'
https://www.c-zzy.com
'
,
// host:'https://www.
czspp.com',
//
host:'https://www.c-zzy.com',
host
:
'
https://
czspp.com
'
,
url
:
'
/fyclass/page/fypage
'
,
searchUrl
:
'
/xssearch?q=**&f=_all&p=fypage
'
,
searchable
:
2
,
//是否启用全局搜索,
quickSearch
:
1
,
//是否启用快速搜索,
filterable
:
0
,
//是否启用分类筛选,
headers
:{
'
User-Agent
'
:
'
U
C_UA
'
,
},
headers
:{
'
User-Agent
'
:
'
P
C_UA
'
,
},
play_parse
:
true
,
lazy
:
''
,
limit
:
6
,
...
...
@@ -18,4 +18,7 @@ var rule={
一级
:
'
.bt_img&&ul&&li;h3.dytit&&Text;img.lazy&&data-original;.jidi&&Text;a&&href
'
,
二级
:{
"
title
"
:
"
h1&&Text;.moviedteail_list li&&a&&Text
"
,
"
img
"
:
"
div.dyimg img&&src
"
,
"
desc
"
:
"
.moviedteail_list li:eq(3) a&&Text;.moviedteail_list li:eq(2) a&&Text;.moviedteail_list li:eq(1) a&&Text;.moviedteail_list li:eq(7) a&&Text;.moviedteail_list li:eq(5) a&&Text
"
,
"
content
"
:
"
.yp_context&&Text
"
,
"
tabs
"
:
"
.mi_paly_box&&span
"
,
"
lists
"
:
"
.paly_list_btn:eq(#id) a
"
},
搜索
:
'
.search_list&&ul&&li;*;*;*;*
'
,
// 预处理:'rule_fetch_params.headers.Cookie = "Hm_lvt_d06dda04a24e89e1117ee1455e217c30=1669008856; 6de728358f84bf15ea9bb771c18f37fb=b4a901c371f729a828c31d9d78def299; myannoun=1; Hm_lvt_c08e84f2c697dc9d0af77ff0dbfb3d6d=1669356917; Hm_lpvt_c08e84f2c697dc9d0af77ff0dbfb3d6d=1669357024; Hm_lpvt_d06dda04a24e89e1117ee1455e217c30=1669357024"',
预处理
:
''
,
预处理
:
'
rule_fetch_params.headers.Cookie="68148872828e9f4d64e7a296f6c6b6d7=5429da9a54375db451f7f9e4f16ce0ea";let new_host="https://czspp.com";let new_html=request(new_host);if(/正在进行人机识别/.test(new_html)){let new_src=pd(new_html,"script&&src",new_host);log(new_src);let hhtml=request(new_src,{withHeaders:true});let json=JSON.parse(hhtml);let html=json.body;let key=html.match(new RegExp(
\'
var key="(.*?)"
\'
))[1];let avalue=html.match(new RegExp(
\'
value="(.*?)"
\'
))[1];let c="";for(let i=0;i<avalue.length;i++){let a=avalue[i];let b=a.charCodeAt();c+=b}let value=md5(c);log(value);let yz_url="https://czspp.com/a20be899_96a6_40b2_88ba_32f1f75f1552_yanzheng_ip.php?type=96c4e20a0e951f471d32dae103e83881&key="+key+"&value="+value;log(yz_url);hhtml=request(yz_url,{withHeaders:true});json=JSON.parse(hhtml);let setCk=Object.keys(json).find(it=>it.toLowerCase()==="set-cookie");let cookie=setCk?json[setCk].split(";")[0]:"";log("cookie:"+cookie);rule_fetch_params.headers.Cookie=cookie;setItem(RULE_CK,cookie)}
'
,
}
\ No newline at end of file
py/厂长预处理.js
0 → 100644
浏览文件 @
787a1389
rule_fetch_params
.
headers
.
Cookie
=
'
68148872828e9f4d64e7a296f6c6b6d7=5429da9a54375db451f7f9e4f16ce0ea
'
;
let
new_host
=
'
https://czspp.com
'
;
let
new_html
=
request
(
new_host
);
if
(
/正在进行人机识别/
.
test
(
new_html
)){
let
new_src
=
pd
(
new_html
,
'
script&&src
'
,
new_host
);
log
(
new_src
);
let
hhtml
=
request
(
new_src
,{
withHeaders
:
true
});
let
json
=
JSON
.
parse
(
hhtml
);
let
html
=
json
.
body
;
let
key
=
html
.
match
(
new
RegExp
(
'
var key=
\
"(.*?)
\
"
'
))[
1
];
let
avalue
=
html
.
match
(
new
RegExp
(
'
value=
\
"(.*?)
\
"
'
))[
1
];
// log(html.indexOf('var key='));
// log(key);
// log(avalue);
let
c
=
''
for
(
let
i
=
0
;
i
<
avalue
.
length
;
i
++
){
let
a
=
avalue
[
i
];
let
b
=
a
.
charCodeAt
();
c
+=
b
;
}
let
value
=
md5
(
c
);
log
(
value
);
let
yz_url
=
'
https://czspp.com/a20be899_96a6_40b2_88ba_32f1f75f1552_yanzheng_ip.php?type=96c4e20a0e951f471d32dae103e83881&key=
'
+
key
+
'
&value=
'
+
value
;
log
(
yz_url
);
hhtml
=
request
(
yz_url
,{
withHeaders
:
true
});
json
=
JSON
.
parse
(
hhtml
);
let
setCk
=
Object
.
keys
(
json
).
find
(
it
=>
it
.
toLowerCase
()
===
'
set-cookie
'
);
let
cookie
=
setCk
?
json
[
setCk
].
split
(
'
;
'
)[
0
]:
''
;
// let cookie = setCk?json[setCk]:'';
log
(
'
cookie:
'
+
cookie
);
rule_fetch_params
.
headers
.
Cookie
=
cookie
;
setItem
(
RULE_CK
,
cookie
);
}
\ No newline at end of file
readme.md
浏览文件 @
787a1389
...
...
@@ -52,6 +52,7 @@
###### 2022/11/25
-
[X] 优化腾云驾雾源,方便追剧
-
[X] 增加新解析并修复酷云自建解析
-
[X] 修复py版厂长资源
###### 2022/11/24
-
[X] 优化alist的历史记录和收藏
-
[X] 设置中心环境变量增加前端的保存校验
...
...
txt/py/py_czspp.py
浏览文件 @
787a1389
...
...
@@ -4,7 +4,8 @@ import sys
sys
.
path
.
append
(
'..'
)
from
base.spider
import
Spider
import
base64
from
requests
import
session
,
utils
import
hashlib
import
requests
from
Crypto.Cipher
import
AES
class
Spider
(
Spider
):
# 元类 默认的元类 type
...
...
@@ -62,34 +63,43 @@ class Spider(Spider): # 元类 默认的元类 type
}
return
result
header
=
{
"User-Agent"
:
"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
}
cookies
=
''
def
getCookie
(
self
,
url
):
rsp
=
self
.
fetch
(
url
,
headers
=
self
.
header
)
baseurl
=
self
.
regStr
(
reg
=
r
'(https://.*?/)'
,
src
=
url
)
append
=
url
.
replace
(
baseurl
,
''
)
zid
=
self
.
regStr
(
rsp
.
text
,
"{0}(
\\
S+)
\"
"
.
format
(
append
))
self
.
zid
=
zid
self
.
cookies
=
rsp
.
cookies
if
'btwaf'
not
in
zid
:
zid
=
''
return
rsp
.
cookies
,
zid
def
getCookie
(
self
,
url
,
header
):
session
=
requests
.
session
()
rsp
=
session
.
get
(
url
)
nurl
=
'https://czspp.com'
+
self
.
regStr
(
rsp
.
text
,
'src=
\"
(.*?)
\"
'
)
nrsp
=
session
.
get
(
nurl
,
headers
=
header
)
key
=
self
.
regStr
(
nrsp
.
text
,
'var key=
\"
(.*?)
\"
'
)
avalue
=
self
.
regStr
(
nrsp
.
text
,
'value=
\"
(.*?)
\"
'
)
c
=
''
for
i
in
range
(
0
,
len
(
avalue
)):
a
=
avalue
[
i
]
b
=
ord
(
a
)
c
=
c
+
str
(
b
)
value
=
hashlib
.
md5
(
c
.
encode
()).
hexdigest
()
session
.
get
(
'https://czspp.com/a20be899_96a6_40b2_88ba_32f1f75f1552_yanzheng_ip.php?type=96c4e20a0e951f471d32dae103e83881&key={0}&value={1}'
.
format
(
key
,
value
),
headers
=
header
)
return
session
def
categoryContent
(
self
,
tid
,
pg
,
filter
,
extend
):
result
=
{}
url
=
'https://czspp.com/{0}/page/{1}'
.
format
(
tid
,
pg
)
if
len
(
self
.
cookies
)
<=
0
:
self
.
getCookie
(
url
)
url
=
url
+
self
.
zid
rsp
=
self
.
fetch
(
url
,
cookies
=
self
.
cookies
,
headers
=
self
.
header
)
header
=
{
"Connection"
:
"keep-alive"
,
"Referer"
:
url
,
"User-Agent"
:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
}
session
=
self
.
getCookie
(
url
,
header
)
rsp
=
session
.
get
(
url
,
cookies
=
self
.
cookies
,
headers
=
header
)
root
=
self
.
html
(
self
.
cleanText
(
rsp
.
text
))
aList
=
root
.
xpath
(
"//div[contains(@class,'bt_img mi_ne_kd mrb')]/ul/li"
)
videos
=
[]
for
a
in
aList
:
name
=
a
.
xpath
(
'./a/img/@alt'
)[
0
]
pic
=
a
.
xpath
(
'./a/img/@data-original'
)[
0
]
mark
=
a
.
xpath
(
"./div[@class='hdinfo']/span/text()"
)[
0
]
mark
=
a
.
xpath
(
".//div[@class='jidi']/span/text()"
)
if
mark
==
[]:
mark
=
a
.
xpath
(
"./div[@class='hdinfo']/span/text()"
)
mark
=
mark
[
0
]
sid
=
a
.
xpath
(
"./a/@href"
)[
0
]
sid
=
self
.
regStr
(
sid
,
"/movie/(
\\
S+).html"
)
videos
.
append
({
...
...
@@ -108,10 +118,13 @@ class Spider(Spider): # 元类 默认的元类 type
def
detailContent
(
self
,
array
):
tid
=
array
[
0
]
url
=
'https://czspp.com/movie/{0}.html'
.
format
(
tid
)
if
len
(
self
.
cookies
)
<=
0
:
self
.
getCookie
(
url
)
url
=
url
+
self
.
zid
rsp
=
self
.
fetch
(
url
,
cookies
=
self
.
cookies
,
headers
=
self
.
header
)
header
=
{
"Connection"
:
"keep-alive"
,
"Referer"
:
url
,
"User-Agent"
:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
}
session
=
self
.
getCookie
(
url
,
header
)
rsp
=
session
.
get
(
url
,
cookies
=
self
.
cookies
,
headers
=
header
)
root
=
self
.
html
(
self
.
cleanText
(
rsp
.
text
))
node
=
root
.
xpath
(
"//div[@class='dyxingq']"
)[
0
]
pic
=
node
.
xpath
(
".//div[@class='dyimg fl']/img/@src"
)[
0
]
...
...
@@ -182,10 +195,13 @@ class Spider(Spider): # 元类 默认的元类 type
def
searchContent
(
self
,
key
,
quick
):
url
=
'https://czspp.com/xssearch?q={0}'
.
format
(
key
)
if
len
(
self
.
cookies
)
<=
0
:
self
.
getCookie
(
url
)
url
=
url
+
self
.
zid
rsp
=
self
.
fetch
(
url
,
cookies
=
self
.
cookies
,
headers
=
self
.
header
)
header
=
{
"Connection"
:
"keep-alive"
,
"Referer"
:
url
,
"User-Agent"
:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
}
session
=
self
.
getCookie
(
url
,
header
)
rsp
=
session
.
get
(
url
,
cookies
=
self
.
cookies
,
headers
=
header
)
root
=
self
.
html
(
self
.
cleanText
(
rsp
.
text
))
vodList
=
root
.
xpath
(
"//div[contains(@class,'mi_ne_kd')]/ul/li/a"
)
videos
=
[]
...
...
@@ -214,6 +230,7 @@ class Spider(Spider): # 元类 默认的元类 type
"filter"
:
{}
}
header
=
{
"Referer"
:
"https://czspp.com/"
,
"User-Agent"
:
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
}
def
parseCBC
(
self
,
enc
,
key
,
iv
):
...
...
@@ -227,11 +244,14 @@ class Spider(Spider): # 元类 默认的元类 type
def
playerContent
(
self
,
flag
,
id
,
vipFlags
):
result
=
{}
url
=
'https://czspp.com/v_play/{0}.html'
.
format
(
id
)
if
len
(
self
.
cookies
)
<=
0
:
self
.
getCookie
(
url
)
url
=
url
+
self
.
zid
header
=
{
"Connection"
:
"keep-alive"
,
"Referer"
:
url
,
"User-Agent"
:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
}
session
=
self
.
getCookie
(
url
,
header
)
pat
=
'
\\
"([^
\\
"]+)
\\
";var [
\\
d
\\
w]+=function dncry.*md5.enc.Utf8.parse
\\
(
\\
"([
\\
d
\\
w]+)
\\
".*md5.enc.Utf8.parse
\\
(([
\\
d]+)
\\
)'
rsp
=
se
lf
.
fetch
(
url
,
cookies
=
self
.
cookies
,
headers
=
self
.
header
)
rsp
=
se
ssion
.
get
(
url
,
cookies
=
self
.
cookies
,
headers
=
header
)
html
=
rsp
.
text
content
=
self
.
regStr
(
html
,
pat
)
if
content
==
''
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录