首页 > 其他分享 >korean sexy pet网站爬取

korean sexy pet网站爬取

时间:2024-01-16 18:06:11浏览次数:24  
标签:cookies sexypet CFAE pet 3A% sec 25EC% sexy korean

import requests
from lxml import etree
cookies = {
    'fb_external_id': '13ff5c994e2864ebef4d0a2dba4d0ba6985ad724fe2b9608a0de1237e082102d',
    '_fwb': '57RgnHB1Jl9KS0nY5fIGRX.1704026411225',
    'ec_ipad_device': 'F',
    'iSearchKey': '0',
    'CFAE_CID': 'CFAE_CID.sexypet_1.5QHSFSM.1704026417344',
    'CFAE_CUK1Y': 'CFAE_CUK1Y.sexypet_1.5QHSFSM.1704026417344',
    'CFAE_CUK45': 'CFAE_CUK45.sexypet_1.5QHSFSM.1704026417344',
    'CVID_Y': 'CVID_Y.42574c4d4850446602.1704026417344',
    '_ga': 'GA1.1.1020315262.1704026420',
    'CUK45': 'cuk45_sexypet_a1d61d29001606b63855f6202e11a441',
    'CUK2Y': 'cuk2y_sexypet_a1d61d29001606b63855f6202e11a441',
    'CID': 'CID6fb2ec5a77875091c1625cdd273f788f',
    'ECSESSID': '42ab0ae41561643f523cb70c6715b91b',
    'atl_epcheck': '1',
    'atl_option': '1%2C1%2CH',
    'basketcount_1': '0',
    'isviewtype': 'pc',
    'CID6fb2ec5a77875091c1625cdd273f788f': '025ef7de5576ef52aa2f76b18102cb52%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%2Fproduct%2F%25EC%25A0%2584%25EC%258B%25A0-%25EC%258A%25A4%25ED%258A%25B8%25EB%259E%25A9-%25EC%2598%25AC%25EC%259D%25B8%25EC%259B%2590%2F2286%2Fcategory%2F47%2Fdisplay%2F2%2F%3A%3A1704073352%3A%3A%3A%3Appdp%3A%3A1704073352%3A%3A%3A%3A%3A%3A%3A%3A',
    'CVID': 'CVID.42574c4d4850446602.1704073353111',
    'recent_plist': '2286%7C2287%7C2022',
    'fb_event_id': 'event_id.sexypet.1.P21JHCPLLGPFE9VYAD395IPS35OYP2W4H',
    'wcs_bt': 's_22145f2006:1704073455',
    'CFAE_LC': 'CFAE_LC.sexypet_1.1MGMESI.1704073457108',
    'vt': '1704073456',
    '_ga_5JX34RJSG0': 'GS1.1.1704073352.2.1.1704073497.0.0.0',
}

headers = {
    'authority': 'sexypet.co.kr',
    'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
    'accept-language': 'zh-CN,zh;q=0.9',
    'cache-control': 'no-cache',
    # Requests sorts cookies= alphabetically
    # 'cookie': 'fb_external_id=13ff5c994e2864ebef4d0a2dba4d0ba6985ad724fe2b9608a0de1237e082102d; _fwb=57RgnHB1Jl9KS0nY5fIGRX.1704026411225; ec_ipad_device=F; iSearchKey=0; CFAE_CID=CFAE_CID.sexypet_1.5QHSFSM.1704026417344; CFAE_CUK1Y=CFAE_CUK1Y.sexypet_1.5QHSFSM.1704026417344; CFAE_CUK45=CFAE_CUK45.sexypet_1.5QHSFSM.1704026417344; CVID_Y=CVID_Y.42574c4d4850446602.1704026417344; _ga=GA1.1.1020315262.1704026420; CUK45=cuk45_sexypet_a1d61d29001606b63855f6202e11a441; CUK2Y=cuk2y_sexypet_a1d61d29001606b63855f6202e11a441; CID=CID6fb2ec5a77875091c1625cdd273f788f; ECSESSID=42ab0ae41561643f523cb70c6715b91b; atl_epcheck=1; atl_option=1%2C1%2CH; basketcount_1=0; isviewtype=pc; CID6fb2ec5a77875091c1625cdd273f788f=025ef7de5576ef52aa2f76b18102cb52%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%3A%2Fproduct%2F%25EC%25A0%2584%25EC%258B%25A0-%25EC%258A%25A4%25ED%258A%25B8%25EB%259E%25A9-%25EC%2598%25AC%25EC%259D%25B8%25EC%259B%2590%2F2286%2Fcategory%2F47%2Fdisplay%2F2%2F%3A%3A1704073352%3A%3A%3A%3Appdp%3A%3A1704073352%3A%3A%3A%3A%3A%3A%3A%3A; CVID=CVID.42574c4d4850446602.1704073353111; recent_plist=2286%7C2287%7C2022; fb_event_id=event_id.sexypet.1.P21JHCPLLGPFE9VYAD395IPS35OYP2W4H; wcs_bt=s_22145f2006:1704073455; CFAE_LC=CFAE_LC.sexypet_1.1MGMESI.1704073457108; vt=1704073456; _ga_5JX34RJSG0=GS1.1.1704073352.2.1.1704073497.0.0.0',
    'pragma': 'no-cache',
    'referer': 'https://sexypet.co.kr/category/best-100/24/?page=2',
    'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"Windows"',
    'sec-fetch-dest': 'document',
    'sec-fetch-mode': 'navigate',
    'sec-fetch-site': 'same-origin',
    'sec-fetch-user': '?1',
    'upgrade-insecure-requests': '1',
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
}

params = {
    'page': '1',
}

response = requests.get('https://sexypet.co.kr/category/best-100/24/', params=params, cookies=cookies, headers=headers)
# print(response)

html=etree.HTML(response.text)
res=html.xpath('//div[@class="thumbnail"]/a/@href')
# print(res)
next_url_lst=['https://sexypet.co.kr'+item for item in res]
# print(next_url_lst)
for item in next_url_lst:
    response = requests.get(item, params=params, cookies=cookies,
                            headers=headers)
    html = etree.HTML(response.text)
    res = html.xpath('//div[@class="thumbnail"]/a//img/@src')
    print("https:"+res[0])

korean sexy pet网站爬取_f5



标签:cookies,sexypet,CFAE,pet,3A%,sec,25EC%,sexy,korean
From: https://blog.51cto.com/xiaohaiwa/9275704

相关文章

  • PuppeteerSharp库在C#中的应用案例
    引言PuppeteerSharp是一个针对GoogleChrome浏览器的高级API库,它允许我们使用C#来控制Chrome浏览器的,比如模拟用户行为操作、爬取网页内容等。本文将介绍如何使用PuppeteerSharp库在C#中实现下载千图网图片并保存为PDF文件的案例。PuppeteerSharp技术PuppeteerSharp提供了一......
  • puppeteer的简单使用
    引言对于编写应用程序,尤其是要部署上线投入生产使用的应用,QA是其中重要的一环,在过去的工作经历中,我参与的项目开发,大多是由测试同学主要来把控质量的,我很少编写前端方面的测试代码,对于测试工具的使用,也基本停留在一个小玩具的样子,所以接触的也少,回忆上一次写单元测试,还是在一个vu......
  • Pyppeteer && Selenium
    Selenium是一个开源、免费、简单、灵活,对Web浏览器支持良好的自动化测试工具,在UI自动化、爬虫等场景下是十分实用的,能够熟练掌握并使用Selenium工具可以大大的提高效率。Selenium简介Selenium支持多平台、多浏览器、多语言去实现自动化测试,是一个开源和可移植的Web测试框架,支持并行......
  • CF1914F Programming Competition 贪心原则的DP?
    终于理解了...希望写给小伙伴们,希望大伙可以理解。先确定贪心规则,即当最大子树不超过根子树减一的一半时,内部节点可以完全匹配。否则,可以先拿其他子树节点与最大子树内部节点匹配,子树内部再进行匹配。啥你说子树内部不够匹配怎么办?可以这么想,你这样都到匹配上限了,已经完全可以达......
  • Guava的TypeToken在泛型编程中的应用
    第1章:引言在Java世界里,泛型是个相当棒的概念,能让代码更加灵活和类型安全。但是,泛型也带来了一些挑战,特别是当涉及到类型擦除时。这就是TypeToken大显身手的时候!作为Java程序员的咱们,都知道泛型可以让代码更加通用,但同时也可能会导致一些类型信息在运行时丢失,这就是所谓的类型擦......
  • VisualStudio2019创建Code Snippet
    CodeSnippet是什么CodeSnippet,与其称其为代码片段(CodeBlock),将它翻译成代码模板(CodeTemplate)可能更合适一些。任何一段代码都可以叫做代码片段,我们这里要讲的不是这种随性的东西,而是一种快速生成代码的快捷方式,通过它可以有效地提高我们的编程效率。举个例子,假如你在C#......
  • CF1914F Programming Competition
    原题链接感觉有点类似agc034eCompleteCompress,但那题比这个难得多。定义\(f_x\)为以\(x\)为根的子树中,尽可能组队后最多剩下多少人,\(siz_x\)为子树大小。记\(y\inson(x)\)中\(f_y\)最大的点为\(hson_x\)。当\(\sum\limits_{y\inson(x),y\not=hson_x}siz_y<......
  • [AGC020D] Min Max Repetition
    牛子题优先满足第二个条件,长度是\(\lceil\frac{max(A,B)}{min(A,B)+1}\rceil\),那么现在要满足字典序最小,发现先填\(A..ABA..ABA..AB..\),中途可能\(B>>A\)就填不满,就要改变策略,变成\(B..BAB..BA...\)这样子的,但是注意可能\(B\)有余数,那我肯定优先把有余数个\(B\),这......
  • NPOI snippet
     exceladdress(varcr=newCellReference("D5");)1varworkbook=newXSSFWorkbook(stream);2varsheet=workbook.GetSheetAt(0);34varcr=newCellReference("D5");5varrow=sheet.GetRow(cr.Row);6varcell=row.Get......
  • 通过计算巢部署 Puppet Enterprise 服务
    概述PuppetEnterprise是一款自动化软件,可帮助您和您的组织在管理IT基础设施的同时提高工作效率和敏捷性。本文向您介绍如何开通计算巢上的PuppetEnterprise服务,以及部署流程和使用说明。计费说明PuppetEnterprise服务在计算巢上的费用主要涉及:所选vCPU与内存规格系......