当前位置:网站首页>前嗅ForeSpider教程:抽取数据
前嗅ForeSpider教程:抽取数据
2022-06-30 09:49:00 【全栈程序员站长】
今天,小编为大家带来的教程是:如何在前嗅ForeSpider中抽取数据。主要内容包括:如何选择表单,如何采集列表/表格数据两大部分。具体内容如下:
一,如何选择表单
在ForeSpider爬虫中,表单是可以复用的表结构,建好的表单可以重复用于多个任务。
数据表选择页
1.选择表单
方法一:通过下拉菜单,或填写表单ID,选择已有表单。 方法二:快速建表,点击创建表单,进入快速建表页面,新建表单。(>>详见快速建表) 方法三:自由建表,点击“采集配置”-“数据建表”,点击采“采集表单”后面的。(>>详见自由建表)
数据建表页
2.数据存储方式
指的是数据采集时,在数据库里的存储方式。 ①插入:默认为插入。如遇到数据库中已存在的重复数据,则不再插入。 ②仅更新:如遇到数据库中已存在的重复数据,则用最新采集的数据覆盖掉。 ③追加:如字段的属性是运算字段,则可以进行字段运算。 ④插入并更新:没有重复的记录则插入,有重复记录则更新。
二,如何采集列表/表格数据
识别列表用于存储表格/列表的数据,将表格/列表的不同列对应存入不同字段,表格/列表的不同行分别存储为数据表的多条记录。以前嗅官网Web服务器(http://www.forenose.com/panne…)为例。
1.创建表单
根据表格内容,创建一个存储表格数据的表单。在选项卡“数据建表”中,创建一个表单。(>>自由建表)
识别列表的表结构
(1)主键 采集表格时,表格的一行作为一条数据。由于整个表格属于同一个网页文档,而文档主键只有一个,因此不能像采集其他内容一样,取值类型选择“网页主键”。 表格的主键的变量类型,根据表格的行数长度,选择“Integer”或者“Long”。取值类型选择“空”。字段属性选择“主键字段”和“自动字段”(选择主键字段后,软件会自动选择“键值唯一”和“索引字段”。)
主键字段的配置
(2)其他字段 其他字段的变量类型选择“string”,取值类型选择“选区内全部文本”。(>>字段参数)
其他字段的配置
2.创建数据抽取
为数据抽取选择表单
选择表单
3.识别多值
点击“默认数据抽取”节点,按Ctrl点击任意某个单元格,按Shift再次点击扩大区域范围。
定位表格
点击“识别多值”,选区扩大到整个表格。点击“确认选区”。
确认多值
4.字段取值
主键字段不需要配置。存储表格内容的字段需要一一取值。(方法一:标准定位/方法二:特征定位) 点击数据抽取的字段,为其一一配置表格不同列的数据。点击相应字段,按Ctrl点击第一列的任意单元格,点击“保存”。
多值字段取值
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/101092.html原文链接:https://javaforall.cn
边栏推荐
- 技能梳理[email protected]體感機械臂
- Skill combing [email protected] somatosensory manipulator
- June training (day 30) - topology sorting
- Go -- maximum heap and minimum heap
- Apple's 5g chip was revealed to have failed in research and development, and the QQ password bug caused heated discussion. Wei Lai responded to the short selling rumors. Today, more big news is here
- AttributeError: ‘Version‘ object has no attribute ‘major‘
- Es common curl finishing
- CSDN博客运营团队2022年H1总结
- MySQL log management, backup and recovery of databases (1)
- Harvester ch1 of CKB and HNS, connection tutorial analysis
猜你喜欢

Chen Haotian won the national championship of the national finals of the 7th children's model star ceremony

Launch of Rural Revitalization public welfare fund and release of public welfare bank for intangible cultural heritage protection of ancient tea tree

"Kunming City coffee map" was opened again, and coffee brought the city closer

ArcGIS Pro脚本工具(5)——排序后删除重复项

MySQL log management, backup and recovery of databases (2)

MySQL advanced SQL statement of database (1)

逸仙电商发布一季报:坚持研发及品牌投入,实现可持续高质量发展

Guolin was crowned the third place of global popularity of perfect master in the third quarter of 2022

今晚19:00知识赋能第2期直播丨OpenHarmony智能家居项目之控制面板界面设计

Compétences Comb 27 @ Body sense Manipulator
随机推荐
Robot system dynamics - inertia parameters
Koreano essential creates a professional style
Ant s19xp appeared in 140t, why is it called the computing power ceiling by the world
mysql数据库基础:TCL事务控制语言
Leetcode question brushing (II) -- sorting (go Implementation)
Skill combing [email protected] control a dog's running on OLED
Musk has more than 100 million twitter fans, but he has been lost online for a week
新冠无情人有情,芸众惠爱心善举暖人间——捐赠商丘市儿童福利院公益行动
Nlopt -- Nonlinear Optimization -- principle introduction and application method
Highlight display of Jinbei LB box, adhering to mini special effects
MIT-6874-Deep Learning in the Life Sciences Week4
MySQL advanced SQL statement of database (1)
跳跃表介绍
How to seize the opportunity of NFT's "chaos"?
R语言aov函数进行重复测量方差分析(Repeated measures ANOVA、其中一个组内因素和一个组间因素)、分别使用interaction.plot函数和boxplot对交互作用进行可视化
今晚19:00知识赋能第2期直播丨OpenHarmony智能家居项目之控制面板界面设计
OSError: [Errno 28] No space left on device
KOREANO ESSENTIAL打造气质职场范
The human agent of kDa, Jinbei kd6, takes you to explore the metauniverse
我的远程办公深度体验 | 社区征文