From 4bbc7391ff271d17b7a7e3e74e6b35f2efc9bf68 Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Thu, 25 Aug 2022 15:25:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90cms=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=B0=81=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/cms.py | 18 +----------------- pycms.json | 6 ++++-- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/models/cms.py b/models/cms.py index 1851632..49ec190 100644 --- a/models/cms.py +++ b/models/cms.py @@ -54,24 +54,8 @@ class CMS: return result def homeVideoContent(self): - rsp = self.fetch("https://www.genmov.com/", headers=self.header) - root = self.html(rsp.text) - aList = root.xpath("//div[@class='module module-wrapper']//div[@class='module-item']") - videos = [] - for a in aList: - name = a.xpath(".//div[@class='module-item-pic']/a/@title")[0] - pic = a.xpath(".//div[@class='module-item-pic']/img/@data-src")[0] - mark = a.xpath("./div[@class='module-item-text']/text()")[0] - sid = a.xpath(".//div[@class='module-item-pic']/a/@href")[0] - sid = self.regStr(sid, "/video/(\\S+).html") - videos.append({ - "vod_id": sid, - "vod_name": name, - "vod_pic": pic, - "vod_remarks": mark - }) result = { - 'list': videos + 'list': [] } return result diff --git a/pycms.json b/pycms.json index 1129b5e..408b385 100644 --- a/pycms.json +++ b/pycms.json @@ -1,9 +1,11 @@ -{ +{"sites":[{ "key":"dr_yanaifei", "name":"鸭奈飞", - "type":4, + "type":1, "api":"http://192.168.10.99:9000/vod?rule=鸭奈飞", "searchable": 1, "quickSearch": 1, "filterable": 1 +} +] } \ No newline at end of file -- GitLab