def get_performers(self, response):
        meta = response.meta
        jsondata = response.json()['data']['talent']['list']['result']['edges']
        for jsonrow in jsondata:
            item = PerformerItem()
            item['name'] = jsonrow['node']['name']
            item['height'] = str(jsonrow['node']['dimensions']['height']) + "cm"
            item['weight'] = str(jsonrow['node']['dimensions']['weight']) + "kg"
            if jsonrow['node']['dimensions']['measurements']['cup']:
                cup = jsonrow['node']['dimensions']['measurements']['cup']
                cupvalue = re.search(r'(\d{2,3})', cup).group(1)
                cupsize = re.search(r'([A-Za-z]+)', cup).group(1)
                item['cupsize'] = str(round(int(cupvalue) / 2.54)) + cupsize

            if jsonrow['node']['dimensions']['measurements']['waist'] and jsonrow['node']['dimensions']['measurements']['hips']:
                waist = str(round(int(jsonrow['node']['dimensions']['measurements']['waist']) / 2.54))
                hips = str(round(int(jsonrow['node']['dimensions']['measurements']['hips']) / 2.54))
                item['measurements'] = item['cupsize'] + "-" + waist + "-" + hips
            item['network'] = "Fit 18"
            item['url'] = "https://fit18.com/models/" + jsonrow['node']['talentId']
            item['gender'] = 'Female'
            item['bio'] = ''
            item['birthday'] = ''
            item['astrology'] = ''
            item['birthplace'] = ''
            item['ethnicity'] = ''
            item['nationality'] = ''
            item['haircolor'] = ''
            item['tattoos'] = ''
            item['piercings'] = ''
            item['fakeboobs'] = ''
            item['eyecolor'] = ''
            meta['item'] = item.copy()

            imagequery = {
                "operationName": "BatchFindAssetQuery",
                "variables": {
                    "paths": [
                        "/members/models/" + jsonrow['node']['talentId'] + "/profile-sm.jpg"
                    ]
                },
                "query": "query BatchFindAssetQuery($paths: [String!]!) {\n  asset {\n    batch(input: {paths: $paths}) {\n      result {\nserve {\n uri\n}\n}\n}\n}\n}\n"}
            url = "https://fit18.team18.app/graphql"
            imagequery = json.dumps(imagequery)
            yield Request(url, headers=self.headers, body=imagequery, method="POST", callback=self.get_images, meta=meta)
    def parse_performerpage(self, response):
        global json
        itemlist = []

        jsondata = json.loads(response.text)
        data = jsondata['data']
        for jsonentry in data:
            item = PerformerItem()

            item['name'] = jsonentry['name'].title().strip()
            item['network'] = 'Teen Core Club'
            item[
                'url'] = "https://www.teencoreclub.com/browsevideos/actor/" + str(
                    jsonentry['id']) + "/" + jsonentry['name'].replace(
                        " ", "%20").strip()
            item['image'] = "https://www.teencoreclub.com" + jsonentry[
                'image'].replace("\\", "").strip()
            item['image_blob'] = None
            item['bio'] = jsonentry['bio']
            if not item['bio']:
                item['bio'] = ''

            item['gender'] = "Female"
            item['birthday'] = ''
            item['astrology'] = ''
            item['birthplace'] = ''
            item['ethnicity'] = ''
            item['nationality'] = ''
            item['haircolor'] = ''
            item['weight'] = ''
            item['height'] = ''
            item['measurements'] = ''
            item['tattoos'] = ''
            item['piercings'] = ''
            item['cupsize'] = ''
            item['fakeboobs'] = ''
            item['eyecolor'] = ''

            itemlist.append(item.copy())
            item.clear()

        return itemlist
Esempio n. 3
0
    def get_performers(self, response):
        item_list = []
        jsondata = response.json()
        jsondata = jsondata['snippets']
        jsondata = jsondata['snippet-modelsGrid-modelItemsAppend'].lower()
        jsonsel = Selector(text=jsondata)
        performers = jsonsel.xpath(
            '//div[contains(@class,"color_12-shadow-sm-hover")]')
        count = 0
        for performer in performers:
            count = count + 1
            item = PerformerItem()
            item['bio'] = ''
            item['gender'] = ''
            item['birthday'] = ''
            item['astrology'] = ''
            item['birthplace'] = ''
            item['ethnicity'] = ''
            item['nationality'] = ''
            item['haircolor'] = ''
            item['measurements'] = ''
            item['tattoos'] = ''
            item['piercings'] = ''
            item['fakeboobs'] = ''
            item['eyecolor'] = ''
            item['cupsize'] = ''
            item['height'] = ''
            item['weight'] = ''
            item['network'] = "PornCZ"
            name = performer.xpath('./div/h3/a/text()').get()
            if name:
                item['name'] = name.strip().title()

            url = performer.xpath('./a/@href').get()
            if url:
                item['url'] = "https://www.porncz.com/" + url.strip()

            image = performer.xpath('./a/img/@data-src').get()
            if image:
                item['image'] = "https://www.porncz.com" + image.strip()

            item['image_blob'] = None

            descline = performer.xpath('./a/div/p/text()').get()
            if descline:
                descline = descline.replace("-", "").strip()
                if re.search('size:(.*)weight', descline):
                    cupsize = re.search('size:(.*)weight', descline).group(1)
                    if cupsize:
                        item['cupsize'] = cupsize.strip().title()

                if re.search(r'(\d+\ kg)', descline):
                    weight = re.search(r'(\d+\ kg)', descline).group(1)
                    if weight:
                        item['weight'] = weight.strip().title()

                if re.search(r'(\d+\ cm)', descline):
                    height = re.search(r'(\d+\ cm)', descline).group(1)
                    if height:
                        item['height'] = height.strip().title()

            item_list.append(item.copy())
            item.clear()

        return item_list