# JokeScrapy **Repository Path**: sdm89/JokeScrapy ## Basic Information - **Project Name**: JokeScrapy - **Description**: 笑话爬虫 - **Primary Language**: Python - **License**: AFL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-25 - **Last Updated**: 2021-08-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: Scrapy, Sipder, 笑话爬虫 ## README # Joke_Scrapy:笑话网的笑话数据总览 - pwd > FirstScrapy/spiders/PageScripy.py - start ```shell scrapy crawl PageScripy -o PageScripy.json # 导出成 json 文件 scrapy crawl PageScripy -o PageScripy.jl # 导出成 jl 文件 # 可导出格式 'json', 'jsonlines', 'jl', 'csv', 'xml', 'marshal', 'pickle' ``` - information > 笑话网`Scrapy`爬虫,爬取笑话网的笑话数据 - logger > 2021年 08月 26日 星期四 > > 代码优化,使用文档最新内容 > {1} extract(),extract_all() 官方替换成 get(),getall() 函数 > {2} product['key'] = 'value' 用于设置字段值,一般用于修改字段值, > {3} ScrapyItem(key_01= value,key_02=value, ------,key_0n = value_0n) 用于初始化操作 > {4} 若要创建项的浅表副本,可以调用 copy(): product2 = product.copy()/product2 = Product(product) > {5} 若要创建深层副本,请调用 deepcopy(): product2 = product.deepcopy()