| 90 | result['total'] = 999999 |
| 91 | return result |
| 92 | def detailContent(self,array): |
| 93 | # video-info-header |
| 94 | tid = array[0] |
| 95 | url = 'https://www.genmov.com/video/{0}.html'.format(tid) |
| 96 | rsp = self.fetch(url,headers=self.header) |
| 97 | root = self.html(rsp.text) |
| 98 | title = root.xpath(".//h1[@class='page-title']/text()")[0] |
| 99 | pic = root.xpath(".//div[@class='video-cover']//img/@data-src")[0] |
| 100 | vod = { |
| 101 | "vod_id":tid, |
| 102 | "vod_name":title, |
| 103 | "vod_pic":pic, |
| 104 | "type_name":"", |
| 105 | "vod_year":"", |
| 106 | "vod_area":"", |
| 107 | "vod_remarks":"", |
| 108 | "vod_actor":"", |
| 109 | "vod_director":"", |
| 110 | "vod_content":"" |
| 111 | } |
| 112 | infoArray = root.xpath(".//div[@class='video-info-items']") |
| 113 | for info in infoArray: |
| 114 | content = info.xpath('string(.)') |
| 115 | # if content.startswith('类型'): |
| 116 | # vod['type_name'] = content |
| 117 | # if content.startswith('年份'): |
| 118 | # vod['vod_year'] = content |
| 119 | # if content.startswith('地区'): |
| 120 | # vod['vod_area'] = content |
| 121 | if content.startswith('集数'): |
| 122 | vod['vod_remarks'] = content |
| 123 | if content.startswith('主演'): |
| 124 | vod['vod_actor'] = content |
| 125 | if content.startswith('导演'): |
| 126 | vod['vod_director'] = content |
| 127 | if content.startswith('剧情'): |
| 128 | vod['vod_content'] = content |
| 129 | |
| 130 | vod_play_from = '$$$' |
| 131 | playFrom = [] |
| 132 | vodHeader = root.xpath(".//main[@id='main']//div[@class='module-heading']//div[contains(@class,'module-tab-item')]/span/text()") |
| 133 | for v in vodHeader: |
| 134 | playFrom.append(v) |
| 135 | vod_play_from = vod_play_from.join(playFrom) |
| 136 | |
| 137 | vod_play_url = '$$$' |
| 138 | playList = [] |
| 139 | vodList = root.xpath(".//main[@id='main']//div[contains(@class,'module-list')]//div[@class='sort-item']") |
| 140 | for vl in vodList: |
| 141 | vodItems = [] |
| 142 | aList = vl.xpath('./a') |
| 143 | for tA in aList: |
| 144 | href = tA.xpath('./@href')[0] |
| 145 | name = tA.xpath('./span/text()')[0] |
| 146 | tId = self.regStr(href,'/play/(\\S+).html') |
| 147 | vodItems.append(name + "$" + tId) |
| 148 | joinStr = '#' |
| 149 | joinStr = joinStr.join(vodItems) |