diff --git a/models/cms.py b/models/cms.py index a8e7de9fd0fb8ed2e365d2b70a417c06d4f05b5f..be17985cf917588c1e43b44255e72d17e6a1de43 100644 --- a/models/cms.py +++ b/models/cms.py @@ -91,7 +91,7 @@ class CMS: # params = '-'.join(urlParams) # print(params) # url = self.url + '/{0}.html'.format(params) - pg = str(fypage) + fypage = str(fypage) url = self.url.replace('fyclass',fyclass).replace('fypage',fypage) print(url) headers = {'user-agent': self.ua} @@ -101,6 +101,7 @@ class CMS: pdfh = jsp.pdfh pdfa = jsp.pdfa pd = jsp.pd + print(pdfh(r.text,p[0])) items = pdfa(r.text, p[0]) videos = [] @@ -120,7 +121,7 @@ class CMS: "vod_content": content, }) result['list'] = videos - result['page'] = pg + result['page'] = fypage result['pagecount'] = 9999 result['limit'] = 90 result['total'] = 999999 diff --git a/utils/htmlParser.py b/utils/htmlParser.py index f15e69709a4d57afa5f49d694501db058707eb6e..e2cd308770375c16ab50ddb5df82ea295638cccd 100644 --- a/utils/htmlParser.py +++ b/utils/htmlParser.py @@ -29,7 +29,9 @@ class jsoup: if pd and option in ['url','src','href','data-original']: ret = urljoin(self.MY_URL,ret) else: - ret = ret('fisrt').html() + ret = ret.next() + print(ret) + ret = str(ret('fisrt')) return ret def pdfa(self,html,parse):