| 35 | result['filters'] = self.config['filter'] |
| 36 | return result |
| 37 | def homeVideoContent(self): |
| 38 | tmpRsp = self.fetch("https://xmaomi.net/") |
| 39 | suffix = self.regStr(tmpRsp.text,"window.location.href =\"(\\S+)\"") |
| 40 | url = "https://xmaomi.net"+suffix |
| 41 | # self.cookie = rsp.cookies |
| 42 | rsp = self.fetch(url,cookies=tmpRsp.cookies) |
| 43 | root = self.html(rsp.text) |
| 44 | print(rsp.text[0]) |
| 45 | print(root) |
| 46 | aList = root.xpath("//ul[contains(@class,'hl-vod-list')]/li/a") |
| 47 | videos = [] |
| 48 | for a in aList: |
| 49 | name = a.xpath('./@title')[0] |
| 50 | pic = a.xpath('./@data-original')[0] |
| 51 | mark = a.xpath("./div[@class='hl-pic-text']/span/text()")[0] |
| 52 | sid = a.xpath("./@href")[0] |
| 53 | sid = self.regStr(sid,"/(\\S+).html") |
| 54 | videos.append({ |
| 55 | "vod_id":sid, |
| 56 | "vod_name":name, |
| 57 | "vod_pic":pic, |
| 58 | "vod_remarks":mark |
| 59 | }) |
| 60 | result = { |
| 61 | 'list':videos |
| 62 | } |
| 63 | return result |
| 64 | def categoryContent(self,tid,pg,filter,extend): |
| 65 | result = {} |
| 66 | |