diff --git a/base/rules.db b/base/rules.db index 321ef12eddd4816bcfcda2e2feb51aa5a474def6..f41dffa7ccbb2974d81518f3d53668f9cf6da7c1 100644 Binary files a/base/rules.db and b/base/rules.db differ diff --git a/controllers/cms.py b/controllers/cms.py index 80eef307991c1ba55d797a0b18f36a20bda91813..6e48abdabcb83088ebdd0aa9159f4886aa10d439 100644 --- a/controllers/cms.py +++ b/controllers/cms.py @@ -392,7 +392,7 @@ class CMS: cookies_dict = requests.utils.dict_from_cookiejar(r.cookies) cookie_str = ';'.join([f'{k}={cookies_dict[k]}' for k in cookies_dict]) self.headers['cookie'] = cookie_str - r = requests.get(url, headers=self.headers, timeout=self.timeout) + r = requests.get(url, headers=self.headers, timeout=self.timeout,verify=False) r.encoding = self.encoding html = r.text if html.find('?btwaf=') < 0: @@ -466,7 +466,7 @@ class CMS: pass else: new_classes = [] - r = requests.get(self.homeUrl, headers=self.headers, timeout=self.timeout) + r = requests.get(self.homeUrl, headers=self.headers, timeout=self.timeout,verify=False) html = self.checkHtml(r) # print(html) # print(self.headers) @@ -754,7 +754,7 @@ class CMS: items = [] try: - r = requests.get(url, headers=self.headers, timeout=self.timeout) + r = requests.get(url, headers=self.headers, timeout=self.timeout,verify=False) html = self.checkHtml(r) print(self.headers) # print(html) @@ -831,7 +831,7 @@ class CMS: obj = {} vod_name = '' if not html: # 没传递html参数接下来智能获取 - r = requests.get(url, headers=self.headers, timeout=self.timeout) + r = requests.get(url, headers=self.headers, timeout=self.timeout,verify=False) html = self.checkHtml(r) if is_json: html = self.dealJson(html) @@ -1136,7 +1136,7 @@ class CMS: pd = jsp.pj if is_json else jsp.pd pq = jsp.pq try: - r = requests.get(url, headers=self.headers,timeout=self.timeout) + r = requests.get(url, headers=self.headers,timeout=self.timeout,verify=False) html = self.checkHtml(r) if is_json: html = self.dealJson(html) @@ -1152,7 +1152,7 @@ class CMS: } self.saveCookie(cookie) self.headers['cookie'] = cookie - r = requests.get(url, headers=self.headers, timeout=self.timeout) + r = requests.get(url, headers=self.headers, timeout=self.timeout,verify=False) r.encoding = self.encoding html = r.text if not show_name and not str(html).find(key) > -1: diff --git a/js/version.txt b/js/version.txt index 3645b29bfad2906f4414df06696c7de64229c21c..f48bd70f1f5c93726c80c1567276a3690bb7edfe 100644 --- a/js/version.txt +++ b/js/version.txt @@ -1 +1 @@ -3.9.8beta1 \ No newline at end of file +3.9.8beta2 \ No newline at end of file diff --git "a/js/\345\277\253\347\234\213.js" "b/js/\345\277\253\347\234\213.js" new file mode 100644 index 0000000000000000000000000000000000000000..9df6b3125bda5c6a697eaaeed6174ea5c4f2f760 --- /dev/null +++ "b/js/\345\277\253\347\234\213.js" @@ -0,0 +1,24 @@ +var rule={ + title:'快看', + host:'https://www.kuaikanys.net', + // homeUrl:'/', + url:'/s/fyclass/page/fypage.html', + searchUrl:'/vodsearch/-------------.html?wd=**&submit=', + searchable:2,//是否启用全局搜索, + quickSearch:1,//是否启用快速搜索, + filterable:0,//是否启用分类筛选, + headers:{//网站的请求头,完整支持所有的,常带ua和cookies + 'User-Agent':'MOBILE_UA', + // "Cookie": "searchneed=ok" + }, + class_name:'电影&连续剧&综艺&动漫', + class_url:'dianying&lianxuju&zongyi&dongman', + play_parse:true, + lazy:'', + limit:6, + 推荐:'.show;ul&&li;a&&title;img&&src;.score&&Text;a&&href', + double:true, // 推荐内容是否双层定位 + 一级:'.row&&li;a&&title;img&&src;.score&&Text;a&&href', + 二级:{"title":"h1&&Text;.info&&ul&&p&&Text","img":"img&&src","desc":".info&&ul&&p:eq(-2)&&Text;.info&&ul&&p:eq(-1)&&Text;.info&&ul&&p:eq(0)&&Text;.info&&ul&&p:eq(1)&&Text;.info&&ul&&p:eq(2)&&Text;.info&&ul&&p:eq(3)&&Text","content":".text&&Text","tabs":".play&&span","lists":".playlist&&ul:eq(#id) li"}, + 搜索:'.row&&li;a&&title;img&&src;.score&&Text;a&&href', +} \ No newline at end of file diff --git a/readme.md b/readme.md index fafb0e62075a3d9acfb6edbe6872a3d584a39eee..efc703c57d4b62df40259178e2021f48d335e14d 100644 --- a/readme.md +++ b/readme.md @@ -47,6 +47,8 @@ [dockerfile教程](https://blog.csdn.net/qq_46158060/article/details/125718218) [获取本地设备信息](https://blog.csdn.net/cui_yonghua/article/details/125508991) [获取本地设备信息](https://m.jb51.net/article/140716.htm) +###### 2022/10/17 +- [X] 3.9.8beta2 全局关闭https对应的ssl证书验证 ###### 2022/10/16 - [X] 3.9.8 完成ddys选集播放和免嗅(可惜我刚弄完没播放俩个剧就被封ip了) - [X] 3.9.8beta1 增加了俩自建js解析 diff --git a/utils/encode.py b/utils/encode.py index e4d2416a0740e4c16094bb2b0f5779e37ec9d6f7..5eab29ccfaa844f3c5d014a3e4be64d26f7335d6 100644 --- a/utils/encode.py +++ b/utils/encode.py @@ -61,7 +61,7 @@ def requireCache(lib:str): r = requests.get(lib,headers={ 'Referer': lib, 'User-Agent': UC_UA, - },timeout=5) + },timeout=5,verify=False) with open(lib_path,mode='wb+') as f: f.write(r.content) code = r.text @@ -86,7 +86,7 @@ class OcrApi: def classification(self,img): try: - code = requests.post(self.api,data=img,headers={'user-agent':PC_UA}).text + code = requests.post(self.api,data=img,headers={'user-agent':PC_UA},verify=False).text except Exception as e: print(f'ocr识别发生错误:{e}') code = '' @@ -106,7 +106,7 @@ def verifyCode(url,headers,timeout=5,total_cnt=3,api=None): while cnt < total_cnt: s = requests.session() try: - img = s.get(url=f"{host}/index.php/verify/index.html", headers=headers,timeout=timeout).content + img = s.get(url=f"{host}/index.php/verify/index.html", headers=headers,timeout=timeout,verify=False).content code = ocr.classification(img) print(f'第{cnt+1}次验证码识别结果:{code}') res = s.post(