| 59 | } |
| 60 | return result |
| 61 | def categoryContent(self,tid,pg,filter,extend): |
| 62 | result = {} |
| 63 | urlParams = ["", "", "", "", "", "", "", "", "", "", "", ""] |
| 64 | urlParams[0] = tid |
| 65 | urlParams[8] = pg |
| 66 | for key in extend: |
| 67 | urlParams[int(key)] = extend[key] |
| 68 | params = '-'.join(urlParams) |
| 69 | url = 'https://www.genmov.com/vodshow/{0}.html'.format(params) |
| 70 | rsp = self.fetch(url,headers=self.header) |
| 71 | root = self.html(rsp.text) |
| 72 | aList = root.xpath("//div[@class='module-items']/div[@class='module-item']") |
| 73 | videos = [] |
| 74 | for a in aList: |
| 75 | name = a.xpath(".//div[@class='module-item-pic']/a/@title")[0] |
| 76 | pic = a.xpath(".//div[@class='module-item-pic']/img/@data-src")[0] |
| 77 | mark = a.xpath("./div[@class='module-item-text']/text()")[0] |
| 78 | sid = a.xpath(".//div[@class='module-item-pic']/a/@href")[0] |
| 79 | sid = self.regStr(sid,"/video/(\\S+).html") |
| 80 | videos.append({ |
| 81 | "vod_id":sid, |
| 82 | "vod_name":name, |
| 83 | "vod_pic":pic, |
| 84 | "vod_remarks":mark |
| 85 | }) |
| 86 | result['list'] = videos |
| 87 | result['page'] = pg |
| 88 | result['pagecount'] = 9999 |
| 89 | result['limit'] = 90 |
| 90 | result['total'] = 999999 |
| 91 | return result |
| 92 | def detailContent(self,array): |
| 93 | # video-info-header |
| 94 | tid = array[0] |