| 42 | return result |
| 43 | |
| 44 | def categoryContent(self, tid, pg, filter, extend): |
| 45 | result = {} |
| 46 | header = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"} |
| 47 | url = 'https://www.3qu.live/videos/{0}?page={1}'.format(tid, pg) |
| 48 | rsp = self.fetch(url,headers=header) |
| 49 | root = self.html(self.cleanText(rsp.text)) |
| 50 | aList = root.xpath("//div[@class='main-content-box']/div/div/div/div/div/div/a") |
| 51 | videos = [] |
| 52 | for a in aList: |
| 53 | name = a.xpath('./@title')[0] |
| 54 | picl = a.xpath('./@style')[0] |
| 55 | pica = re.findall(r"url\(\'(.*)\'\);", picl)[0] |
| 56 | pic = 'https://www.3qu.live{0}'.format(pica) |
| 57 | sidh = a.xpath("./@href")[0] |
| 58 | sid = self.regStr(sidh,'/videos/(\\S+).html') |
| 59 | videos.append({ |
| 60 | "vod_id": sid, |
| 61 | "vod_name": name, |
| 62 | "vod_pic": pic, |
| 63 | "vod_remarks": "" |
| 64 | }) |
| 65 | result['list'] = videos |
| 66 | result['page'] = pg |
| 67 | result['pagecount'] = 9999 |
| 68 | result['limit'] = 100 |
| 69 | result['total'] = 99999 |
| 70 | return result |
| 71 | |
| 72 | def detailContent(self, array): |
| 73 | tid = array[0] |