首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏火丁笔记

    如何抓取汽车之家的车型库

    Python3 版本为准): shell> scrapy startproject autohome shell> cd autohome shell> scrapy genspider automobile www.autohome.com.cn ModelItem, SeriesItem class AutomobileSpider(CrawlSpider): name = "automobile" allowed_domains = ["www.autohome.com.cn "] start_urls = [ "http://www.autohome.com.cn/grade/carhtml/" + x + ".html" for series_id", series['series_id']) yield loader.load_item() # 停售 url = "http://www.autohome.com.cn 在使用 crawl 的时候,应该避免覆盖 parse 方法,不过本文的源代码中恰恰重写了 parse 方法,究其原因是因为汽车之家的字母页存在不规范的地方: shell> curl -I http://www.autohome.com.cn

    2.2K30编辑于 2021-12-14
  • 来自专栏TestQA

    selenium下对指定元素进行截图

    driver = webdriver.Ie() driver.maximize_window() driver.get("https://www.autohome.com.cn") driver.save_screenshot from PIL import Image driver = webdriver.PhantomJS() driver.maximize_window() driver.get("https://www.autohome.com.cn import Image import time driver = webdriver.Firefox() driver.maximize_window() driver.get("https://www.autohome.com.cn

    4.4K30发布于 2019-09-18
  • 来自专栏爬虫资料

    将html_table2结果转化为tibble的最佳实践

    本文将分享如何高效地将 html_table2 的结果转化为更适合分析的 tibble 格式,并展示一个以采集汽车之家(https://www.autohome.com.cn/)汽车品牌和价格信息为例的完整实践 paste0("http://", proxy_user, ":", proxy_password, "@", proxy_url, ":", proxy_port)# 爬取数据url <- "https://www.autohome.com.cn paste0("http://", proxy_user, ":", proxy_password, "@", proxy_url, ":", proxy_port)# 目标网址url <- "https://www.autohome.com.cn

    45410编辑于 2024-12-19
  • 来自专栏linux、Python学习

    Python神技能 | 使用爬虫获取汽车之家全车型数据

    打开浏览器控制台的网络请求面板,滚动页面来触发延迟加载,发现浏览器发送了一个异步请求: 微信图片_20190116145710.jpg 复制请求的URL看看: http://www.autohome.com.cn /grade/carhtml/B.html http://www.autohome.com.cn/grade/carhtml/C.html http://www.autohome.com.cn/grade 打开http://www.autohome.com.cn/grade/carhtml/B.html看下,发现页面的数据很规整,是按照品牌-厂商-车系的层级组织的。嗯,正合我意,那就开爬吧。

    1.7K50发布于 2019-01-16
  • 来自专栏北京马哥教育

    Python神技能 | 使用爬虫获取汽车之家全车型数据

    打开浏览器控制台的网络请求面板,滚动页面来触发延迟加载,发现浏览器发送了一个异步请求: 复制请求的URL看看: http://www.autohome.com.cn/grade/carhtml/B.html http://www.autohome.com.cn/grade/carhtml/C.html http://www.autohome.com.cn/grade/carhtml/D.html 找到规律了 打开http://www.autohome.com.cn/grade/carhtml/B.html看下,发现页面的数据很规整,是按照品牌-厂商-车系的层级组织的。嗯,正合我意,那就开爬吧。

    2.3K90发布于 2018-05-03
  • 来自专栏Python研究者

    python爬虫汽车之家全车型及基本参数入数据库(截止50524个数据)(详解)

    按F12打开开发者工具,监听一下动态页面刷到https://www.autohome.com.cn/grade/carhtml/B.html,那我们就可以联想到这些按A-Z排序遍历一下就可以把所有的品牌和对应车系 这样的数据很显而易见了 ,但也别忘前面的数据,代码如下: cxId = "3170" url = "https://www.autohome.com.cn/%s"%(cxId) headers = { /a/@data-yearid')[0]#获得了很重要的参数syearid # print(cxId,syearid) url1 = "https://www.autohome.com.cn /a/@data-yearid')[0] # print(cxId,syearid) url1 = "https://www.autohome.com.cn/ashx/car 这个页面管理一下没有动态数据加载的过程,那就很舒服啦,笔者使用的是BS4加正则表达式,代码如下: cxId = "19"#车系ID url1 = "https://www.autohome.com.cn

    2.3K10发布于 2020-10-22
  • 来自专栏python进阶学习

    汽车行业也开始搞降价大促销活动了

    requests.adapters import threading # 导入threading模块 # 要访问的目标页面 targetUrlList = [ "https://https://www.autohome.com.cn

    7.8K30编辑于 2023-03-09
  • 来自专栏程序员同行者

    html基础+常用标签

    刷新和跳转 < meta http-equiv=“Refresh” Content=“30″> < meta http-equiv=”Refresh“ Content=”5; Url=http://www.autohome.com.cn br 是换行 a标签 < a href="http://<em>www.autohome.com.cn</em>"> target属性,_black表示在新的页面打开 锚(页面之间跳转) H 标签 H1 H2 H3 H4

    1.6K10发布于 2018-06-22
  • 来自专栏Pythonista

    爬虫之汽车之家/抽屉新热榜/煎蛋网

    import requests from bs4 import BeautifulSoup import os # 模拟浏览器发请求 r1 = requests.get(url='https://www.autohome.com.cn

    74930发布于 2018-08-31
  • 利用 Python 抓取数据探索汽车市场趋势

    proxyUser, "pass": proxyPass,}proxies = { "http": proxyMeta, "https": proxyMeta,}url = 'http://www.autohome.com.cn

    40010编辑于 2024-02-29
  • 来自专栏不温卜火

    想要快速爬取整站图片?速进(附完整代码)

    爬取前的准备 汽车直接官网:https://www.autohome.com.cn/ 宝马五系网页地址:https://www.autohome.com.cn/65/ 图片地址:https://car.autohome.com.cn

    96210发布于 2020-10-28
  • 来自专栏爬虫资料

    任务的权限隔离与多租户(SaaS)平台设计要点

    {proxy_pass}@{proxy_host}:{proxy_port}"proxies={"http":proxy_meta,"https":proxy_meta,}url=f"https://www.autohome.com.cn

    36110编辑于 2025-11-11
  • 爬取汽车之家评论并利用NLP进行关键词提取

    537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'}# 目标 URL,这里以某款车型的评论页面为例url = 'https://www.autohome.com.cn

    51510编辑于 2025-06-11
  • 来自专栏ytkah

    你的网站做好神马搜索优化了吗?神马搜索站长工具提交

    示例: http://www.autohome.com.cn/(\d+)/(\d+)/price.html http://m.autohome.com.cn/${1}/${2}/

    8.3K40发布于 2018-03-05
  • 来自专栏散尽浮华

    squid代理http和https方式上网的操作记录

                                                        #yum可以正常使用 [root@dev-new-test1 stunnel]# wget http://www.autohome.com.cn

    4K50发布于 2018-01-22
  • 来自专栏小徐学爬虫

    JS逆向爬虫教程与实战技巧

    ': encrypted_pwd, 'remember': 1, 'vcode': '', 'redirect': 'https://www.autohome.com.cn

    1.7K10编辑于 2025-06-05
  • 来自专栏爬虫资料

    利用爬虫技术自动化采集汽车之家的车型参数数据

    定义全局变量和常量接下来,我们需要定义一些全局变量和常量,用于存储或控制爬虫程序的运行状态:# 定义奥迪A4L的车型参数页面的URLURL = 'https://www.autohome.com.cn/

    1.1K30编辑于 2023-09-18
  • 来自专栏别先生

    Jsoup入门学习一

    它会发起请求并获取数据,封装为Document对象 30 // 使用jsoup解析url 31 Document doc = Jsoup.parse(new URL("https://www.autohome.com.cn

    2.8K10发布于 2020-12-09
  • 来自专栏菲宇

    ajax全套

    <input type="button" value="查看" onclick="changeSrc();">

    <iframe id="ifr" src="http://<em>www.autohome.com.cn</em>

    4.1K20发布于 2019-06-13
领券