GnePro:文章类通用爬虫接口

GnePro是开源项目GNE的付费版,能够实现如下功能:

  • 输入任意文章页面的URL,返回标题/作者/正文/发布时间/图片/面包屑等一系列信息
  • 支持异步加载文章页提取
  • 支持上传自定义的HTML代码提取正文
  • 支持自动检测网页编码
  • 支持自动提取网页全部URL
  • 在8个国家13万个新闻类网站进行测试,准确率高达90%

提取文章正文

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import requests
import json

url = "https://crawler.kingname.info/gne/crawl"

body = {
"url": "https://www.kingname.info/2023/10/17/rubbish/",
"js": False,
"charset": "auto"
}

headers = {
'token': '<TOKEN>',
}

response = requests.post(url, headers=headers, json=body)

response.json()

返回数据如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{'title': '拒绝成为这样的程序员',
'publish_time_ts': 1697545236,
'publish_time': '2023-10-17 12:20:36',
'content': '产品经理这两天在跟我抱怨他们公司的一个码农。听的我火冒三丈,差点把跟了我十多年的搪瓷水杯砸烂。 正好在知识星球和微信群里面,有不少同学跟我咨询程序员的职业发展以及怎么应对三十岁危机。 借此机会,我准备用几篇文章来讲讲自己的经验和个人的观点。 有这样一批人,他们在大公司里工作了十几年,年龄一大把,还是一个大头兵。他们被号称经验丰富,但实际上是把一年的工作经验用了十多年,对主流的技术一无所知,他们已经无法适应现在的技术发展。 这些人,每天看起来非常努力,加班加到很晚。产品经理提需求,他们看起来是在非常努力的完成,但完成的效果非常差。产品给他们提修改意见,他们看起来非常积极地去修改。但是改了A问题,出现B问题,改了B问题,出现C问题,修好C问题,A问题又出现了…… 产品经理每次一说产出效果不好,他们马上就会蹦出一大堆技术名词,又是什么业界难题,又是什么行业边界,又是什么技术翘翘板,把A改了,那么从理论上说B就一定有问题。ABC三个需求无法同时满足。言语之间时不时蹦出一些他们昨天刷公众号看到的技术名词。但其实真正的原因是这个需求达到了他们知识的边界,而他们又不愿意学习。他们花3个月做出来的东西,换一个应届生2天就能完成,而且效果好十倍。 这些人,永远把自己当作一个螺丝钉。产品需要什么,自己就做什么。产品不说的,自己坚决不做。产品找过来,一句“你又没有说要这个功能”就把自己的责任推卸干净。 当任务涉及到多个人协作时,这些人把自己的活干完就跑了。从来不会通知一下上下游的同事。等到项目预计上线的前一晚,产品经理来问: “你这个功能做完了吗?” “做完了。” “那调试好了吗?” “我不知道上游的xx和下游的yy他们做完了没有。” 这样的人,我称之为老油条。 老油条特别喜欢装无辜,我都已经这么努力了,你还想怎么样?然后在线上线下宣传自己被公司压榨,被同事排挤,被老员工PUA.但真实的情况是,公司只让他在做这一件事情,他做了三个月。每一次效果不好,其他人都在陪着他分析原因,等他修改。改完以后效果更差。大家给他一次又一次机会,上线时间为他一次又一次推迟,他一次又一次让大家失望。每次还都会找各种理由各种借口。 很多人希望公司能够开除他,但是老板有顾虑,公司有担忧。不敢开除,甚至不敢给他打低绩效。公司,特别是大公司,非常害怕他们在网上发帖。 弱小不一定有理,弱小只是某些老油条的遮羞布。 我觉得现在互联网环境的风气极差。正适合这些老油条肆意妄为。 当一个人在网上发帖说自己被公司开除了,一大批不知道任何内情的网民就会开始攻击公司,觉得这个人太可怜,觉得这个公司太黑毫无人性。特别是当公司是某些著名大厂时,这种攻击更是毫不留情。 民众总是相信弱小者的哭诉,从来听不见强者背后的辩解。知情人为公司解释两句,一大群人站出来要为弱小着主持公道:你是资本的走狗,你是五毛党,你收了多少钱。 正是这样的老油条,导致开除一个人的成本非常高,公司迫于不想惹麻烦,很多时候对于能力差的人选择睁一只眼闭一只眼。现在大环境降本增效,去肥增瘦,能力差的老油条占住了坑位,就会导致真正有能力的人失去一个又一个进入大厂的机会。 几个大厂里面,有很多很多这样的老油条。看这篇文章的你,本来有机会进大厂一展才华,但都是因为这些老油条占住了人头,导致对应的岗位不再招人。其实你比他更加适合这个岗位,但没办法。 公司没有办法开掉这些人,因为现在舆论的风暴太猛。这些风暴始于老油条的装可怜,加强于键盘党的假公道,盛行于跟风人的瞎同情。 没有办法,真的没办法。 每当产品经理跟我讲起他们公司里面的老油条,我都恨不能当场掀桌,但没办法,我吵架超不过,大架也打不过。赢了坐牢,输了住院。 没办法,真的没办法。 只盼大家擦亮眼睛,在同情某些被劝退的互联网员工前,别急着站队,先想想这个人是不是占了本该属于你的岗位。 抱怨归抱怨,希望大家不要成为这样的人。我们下一篇文章,来讲讲我们应该如何成为一个不会被年龄所限制的优秀工程师。',
'clean_content': '<div><p>产品经理这两天在跟我抱怨他们公司的一个码农。听的我火冒三丈,差点把跟了我十多年的搪瓷水杯砸烂。</p><p>正好在知识星球和微信群里面,有不少同学跟我咨询程序员的职业发展以及怎么应对三十岁危机。</p><p>借此机会,我准备用几篇文章来讲讲自己的经验和个人的观点。</p><p>有这样一批人,他们在大公司里工作了十几年,年龄一大把,还是一个大头兵。他们被号称经验丰富,但实际上是把一年的工作经验用了十多年,对主流的技术一无所知,他们已经无法适应现在的技术发展。</p><p>这些人,每天看起来非常努力,加班加到很晚。产品经理提需求,他们看起来是在非常努力的完成,但完成的效果非常差。产品给他们提修改意见,他们看起来非常积极地去修改。但是改了A问题,出现B问题,改了B问题,出现C问题,修好C问题,A问题又出现了……</p><p>产品经理每次一说产出效果不好,他们马上就会蹦出一大堆技术名词,又是什么业界难题,又是什么行业边界,又是什么技术翘翘板,把A改了,那么从理论上说B就一定有问题。ABC三个需求无法同时满足。言语之间时不时蹦出一些他们昨天刷公众号看到的技术名词。但其实真正的原因是这个需求达到了他们知识的边界,而他们又不愿意学习。他们花3个月做出来的东西,换一个应届生2天就能完成,而且效果好十倍。</p><p>这些人,永远把自己当作一个螺丝钉。产品需要什么,自己就做什么。产品不说的,自己坚决不做。产品找过来,一句“你又没有说要这个功能”就把自己的责任推卸干净。</p><p>当任务涉及到多个人协作时,这些人把自己的活干完就跑了。从来不会通知一下上下游的同事。等到项目预计上线的前一晚,产品经理来问:</p><blockquote><p>“你这个功能做完了吗?”</p><p>“做完了。”</p><p>“那调试好了吗?”</p><p>“我不知道上游的xx和下游的yy他们做完了没有。”</p></blockquote><p>这样的人,我称之为老油条。</p><p>老油条特别喜欢装无辜,我都已经这么努力了,你还想怎么样?然后在线上线下宣传自己被公司压榨,被同事排挤,被老员工PUA.但真实的情况是,公司只让他在做这一件事情,他做了三个月。每一次效果不好,其他人都在陪着他分析原因,等他修改。改完以后效果更差。大家给他一次又一次机会,上线时间为他一次又一次推迟,他一次又一次让大家失望。每次还都会找各种理由各种借口。</p><p>很多人希望公司能够开除他,但是老板有顾虑,公司有担忧。不敢开除,甚至不敢给他打低绩效。公司,特别是大公司,非常害怕他们在网上发帖。</p><p>弱小不一定有理,弱小只是某些老油条的遮羞布。</p><p>我觉得现在互联网环境的风气极差。正适合这些老油条肆意妄为。</p><p>当一个人在网上发帖说自己被公司开除了,一大批不知道任何内情的网民就会开始攻击公司,觉得这个人太可怜,觉得这个公司太黑毫无人性。特别是当公司是某些著名大厂时,这种攻击更是毫不留情。</p><p>民众总是相信弱小者的哭诉,从来听不见强者背后的辩解。知情人为公司解释两句,一大群人站出来要为弱小着主持公道:你是资本的走狗,你是五毛党,你收了多少钱。</p><p>正是这样的老油条,导致开除一个人的成本非常高,公司迫于不想惹麻烦,很多时候对于能力差的人选择睁一只眼闭一只眼。现在大环境降本增效,去肥增瘦,能力差的老油条占住了坑位,就会导致真正有能力的人失去一个又一个进入大厂的机会。</p><p>几个大厂里面,有很多很多这样的老油条。看这篇文章的你,本来有机会进大厂一展才华,但都是因为这些老油条占住了人头,导致对应的岗位不再招人。其实你比他更加适合这个岗位,但没办法。</p><p>公司没有办法开掉这些人,因为现在舆论的风暴太猛。这些风暴始于老油条的装可怜,加强于键盘党的假公道,盛行于跟风人的瞎同情。</p><p>没有办法,真的没办法。</p><p>每当产品经理跟我讲起他们公司里面的老油条,我都恨不能当场掀桌,但没办法,我吵架超不过,大架也打不过。赢了坐牢,输了住院。</p><p>没办法,真的没办法。</p><p>只盼大家擦亮眼睛,在同情某些被劝退的互联网员工前,别急着站队,先想想这个人是不是占了本该属于你的岗位。</p><p>抱怨归抱怨,希望大家不要成为这样的人。我们下一篇文章,来讲讲我们应该如何成为一个不会被年龄所限制的优秀工程师。</p></div>',
'content_list': [{'type': 'text',
'data': '产品经理这两天在跟我抱怨他们公司的一个码农。听的我火冒三丈,差点把跟了我十多年的搪瓷水杯砸烂。',
'caption': ''},
{'type': 'text',
'data': '正好在知识星球和微信群里面,有不少同学跟我咨询程序员的职业发展以及怎么应对三十岁危机。',
'caption': ''},
{'type': 'text', 'data': '借此机会,我准备用几篇文章来讲讲自己的经验和个人的观点。', 'caption': ''},
{'type': 'text',
'data': '有这样一批人,他们在大公司里工作了十几年,年龄一大把,还是一个大头兵。他们被号称经验丰富,但实际上是把一年的工作经验用了十多年,对主流的技术一无所知,他们已经无法适应现在的技术发展。',
'caption': ''},
{'type': 'text',
'data': '这些人,每天看起来非常努力,加班加到很晚。产品经理提需求,他们看起来是在非常努力的完成,但完成的效果非常差。产品给他们提修改意见,他们看起来非常积极地去修改。但是改了A问题,出现B问题,改了B问题,出现C问题,修好C问题,A问题又出现了……',
'caption': ''},
{'type': 'text',
'data': '产品经理每次一说产出效果不好,他们马上就会蹦出一大堆技术名词,又是什么业界难题,又是什么行业边界,又是什么技术翘翘板,把A改了,那么从理论上说B就一定有问题。ABC三个需求无法同时满足。言语之间时不时蹦出一些他们昨天刷公众号看到的技术名词。但其实真正的原因是这个需求达到了他们知识的边界,而他们又不愿意学习。他们花3个月做出来的东西,换一个应届生2天就能完成,而且效果好十倍。',
'caption': ''},
{'type': 'text',
'data': '这些人,永远把自己当作一个螺丝钉。产品需要什么,自己就做什么。产品不说的,自己坚决不做。产品找过来,一句“你又没有说要这个功能”就把自己的责任推卸干净。',
'caption': ''},
{'type': 'text',
'data': '当任务涉及到多个人协作时,这些人把自己的活干完就跑了。从来不会通知一下上下游的同事。等到项目预计上线的前一晚,产品经理来问:',
'caption': ''},
{'type': 'text', 'data': '“你这个功能做完了吗?”', 'caption': ''},
{'type': 'text', 'data': '“做完了。”', 'caption': ''},
{'type': 'text', 'data': '“那调试好了吗?”', 'caption': ''},
{'type': 'text', 'data': '“我不知道上游的xx和下游的yy他们做完了没有。”', 'caption': ''},
{'type': 'text', 'data': '这样的人,我称之为老油条。', 'caption': ''},
{'type': 'text',
'data': '老油条特别喜欢装无辜,我都已经这么努力了,你还想怎么样?然后在线上线下宣传自己被公司压榨,被同事排挤,被老员工PUA.但真实的情况是,公司只让他在做这一件事情,他做了三个月。每一次效果不好,其他人都在陪着他分析原因,等他修改。改完以后效果更差。大家给他一次又一次机会,上线时间为他一次又一次推迟,他一次又一次让大家失望。每次还都会找各种理由各种借口。',
'caption': ''},
{'type': 'text',
'data': '很多人希望公司能够开除他,但是老板有顾虑,公司有担忧。不敢开除,甚至不敢给他打低绩效。公司,特别是大公司,非常害怕他们在网上发帖。',
'caption': ''},
{'type': 'text', 'data': '弱小不一定有理,弱小只是某些老油条的遮羞布。', 'caption': ''},
{'type': 'text', 'data': '我觉得现在互联网环境的风气极差。正适合这些老油条肆意妄为。', 'caption': ''},
{'type': 'text',
'data': '当一个人在网上发帖说自己被公司开除了,一大批不知道任何内情的网民就会开始攻击公司,觉得这个人太可怜,觉得这个公司太黑毫无人性。特别是当公司是某些著名大厂时,这种攻击更是毫不留情。',
'caption': ''},
{'type': 'text',
'data': '民众总是相信弱小者的哭诉,从来听不见强者背后的辩解。知情人为公司解释两句,一大群人站出来要为弱小着主持公道:你是资本的走狗,你是五毛党,你收了多少钱。',
'caption': ''},
{'type': 'text',
'data': '正是这样的老油条,导致开除一个人的成本非常高,公司迫于不想惹麻烦,很多时候对于能力差的人选择睁一只眼闭一只眼。现在大环境降本增效,去肥增瘦,能力差的老油条占住了坑位,就会导致真正有能力的人失去一个又一个进入大厂的机会。',
'caption': ''},
{'type': 'text',
'data': '几个大厂里面,有很多很多这样的老油条。看这篇文章的你,本来有机会进大厂一展才华,但都是因为这些老油条占住了人头,导致对应的岗位不再招人。其实你比他更加适合这个岗位,但没办法。',
'caption': ''},
{'type': 'text',
'data': '公司没有办法开掉这些人,因为现在舆论的风暴太猛。这些风暴始于老油条的装可怜,加强于键盘党的假公道,盛行于跟风人的瞎同情。',
'caption': ''},
{'type': 'text', 'data': '没有办法,真的没办法。', 'caption': ''},
{'type': 'text',
'data': '每当产品经理跟我讲起他们公司里面的老油条,我都恨不能当场掀桌,但没办法,我吵架超不过,大架也打不过。赢了坐牢,输了住院。',
'caption': ''},
{'type': 'text', 'data': '没办法,真的没办法。', 'caption': ''},
{'type': 'text',
'data': '只盼大家擦亮眼睛,在同情某些被劝退的互联网员工前,别急着站队,先想想这个人是不是占了本该属于你的岗位。',
'caption': ''},
{'type': 'text',
'data': '抱怨归抱怨,希望大家不要成为这样的人。我们下一篇文章,来讲讲我们应该如何成为一个不会被年龄所限制的优秀工程师。',
'caption': ''}],
'summary': '产品经理这两天在跟我抱怨他们公司的一个码农。听的我火冒三丈,差点把跟了我十多年的搪瓷水杯砸烂。. 正好在知识星球和微信群里面,有不少同学跟我咨询程序员的职业发展以及怎么应对三十岁危机。',
'canonical_url': 'https://www.kingname.info/2023/10/17/rubbish/',
'image_count': 0,
'image_urls': [],
'image_captions': [],
'head_meta': {'og:description': '产品经理这两天在跟我抱怨他们公司的一个码农。听的我火冒三丈,差点把跟了我十多年的搪瓷水杯砸烂。 正好在知识星球和微信群里面,有不少同学跟我咨询程序员的职业发展以及怎么应对三十岁危机。 借此机会,我准备用几篇文章来讲讲自己的经验和个人的观点。',
'description': '产品经理这两天在跟我抱怨他们公司的一个码农。听的我火冒三丈,差点把跟了我十多年的搪瓷水杯砸烂。 正好在知识星球和微信群里面,有不少同学跟我咨询程序员的职业发展以及怎么应对三十岁危机。 借此机会,我准备用几篇文章来讲讲自己的经验和个人的观点。',
'og:type': 'article',
'viewport': 'width=device-width',
'article:tag': '开发经验',
'generator': 'Hexo 6.2.0',
'og:site_name': '谢乾坤 | Kingname',
'article:author': '青南',
'theme-color': '#222',
'article:published_time': '2023-10-17T12:20:36.000Z',
'og:locale': 'zh_CN',
'og:url': 'https://www.kingname.info/2023/10/17/rubbish/index.html',
'og:title': '拒绝成为这样的程序员',
'article:modified_time': '2023-10-17T12:21:20.216Z',
'twitter:card': 'summary'},
'author': [],
'timezone': 'UTC8',
'url': 'https://www.kingname.info/2023/10/17/rubbish/',
'amp_url': '',
'breadcrumb': []}

JS渲染页面

如果使用上面的设置抓取网页,返回如下报错信息:

1
2
3
4
 {
"success": false,
"msg": "解析正文失败!"
}

那么,只需要把参数中的"js": false改为"js": true即可.例如:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 import requests
import json

url = "https://crawler.kingname.info/gne/crawl"

body = {
"url": "https://mp.weixin.qq.com/s/VObN8Ve8piv_I13fKbWhww",
"js": True,
"charset": "auto"
}

headers = {
'token': '<TOKEN>',
}

response = requests.post(url, headers=headers, json=body)

response.json()

开启JS渲染以后,速度会比较慢.因此建议先使用普通模式,解析失败再使用JS渲染模式.

抓取页面链接

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 import requests
import json

url = "https://crawler.kingname.info/gne/crawl"

body = {
"url": "https://www.kingname.info/archives/",
"js": false,
"charset": "auto",
"target": "link"
}

headers = {
'token': '<TOKEN>',
}

response = requests.post(url, headers=headers, json=body)

response.json()

返回结果如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[{'url': 'https://www.kingname.info/', 'anchor': '谢乾坤 | Kingname'},
{'url': 'https://www.kingname.info/archives/', 'anchor': '归档'},
{'url': 'https://www.kingname.info/tags', 'anchor': '标签'},
{'url': 'https://www.kingname.info/mp', 'anchor': '公众号'},
{'url': 'https://www.kingname.info/about', 'anchor': '关于'},
{'url': 'https://github.com/kingname', 'anchor': 'GitHub'},
{'url': 'https://www.kingname.info/2023/11/29/jwt/',
'anchor': '一日一技:分布式系统的低成本权限校验机制'},
{'url': 'https://www.kingname.info/2023/11/15/git-worktree/',
'anchor': '一日一技:如何同时在多个分支写代码?'},
{'url': 'https://www.kingname.info/2023/11/14/typeddict/',
'anchor': '一日一技:警告但不禁止,遗留代码的优化策略'},
{'url': 'https://www.kingname.info/2023/11/11/gpts/',
'anchor': '老板让我加班怎么办?GPTs创建机器人实战'},
{'url': 'https://www.kingname.info/2023/11/11/python-run-other-code/',
'anchor': '一日一技:如何安全运行别人上传的Python代码?'},
{'url': 'https://www.kingname.info/2023/10/28/parse-json-object/',
'anchor': '一日一技:爬虫如何解析JavaScript Object?'},
{'url': 'https://www.kingname.info/2023/10/28/json-in-html/',
'anchor': '一日一技:HTML里面提取的JSON怎么解析不了?'},
{'url': 'https://www.kingname.info/2023/10/17/curl-cffi/',
'anchor': '一日一技:Requests被网站识别怎么办?'},
{'url': 'https://www.kingname.info/2023/10/17/rubbish/',
'anchor': '拒绝成为这样的程序员'},
{'url': 'https://www.kingname.info/2023/09/22/json-to-obj/',
'anchor': '一日一技:JSON如何快速转成对象?'},
{'url': 'https://www.kingname.info/archives/page/2/', 'anchor': '2'},
{'url': 'https://www.kingname.info/archives/page/23/', 'anchor': '23'},
{'url': 'https://hexo.io/', 'anchor': 'Hexo'},
{'url': 'https://theme-next.js.org/muse/', 'anchor': 'NexT.Muse'}]

自己上传HTML解析

上传完整HTML

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 with open('/Users/kingname/Downloads/okx.html') as f:
html = f.read()

import requests
import time

body = {
'html': html,
'url': 'https://www.okx.com/learn/curve-finance-guide',
'fetch_time': int(time.time()),
'charset': 'utf-8'}
resp = requests.post('https://crawler.kingname.info/gne/crawl_html',
json=body,
headers={'token': '<TOKEN>'})
print(resp.json())

请求参数中的url字段不能省略,因为有一些网站的图片和链接使用的是相对URL,此时需要使用URL字段跟这些相对URL拼接出完整的URL.这个字段的值只需要保证域名正确就可以了.例如值填写成https://www.kinganme.info/1/2/3也没有问题.

请求参数中的fetch_time也不能省略,因为有一些文章的发布时间是类似于2小时前,30分钟前这种写法.需要根据这个字段的值,推导出正确的文章发布时间.

返回结果如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
{'title': 'Exploring Curve Finance: A comprehensive guide',
'publish_time_ts': 1686801600,
'publish_time': '2023-06-15 04:00:00',
'content': 'Ethereum’s network is the home to a wide range of unique projects. Ever since it created the ERC-20 token model, thousands of tokens have been launched. In time, new products have emerged as well, such as dApps, decentralized finance (DeFi) protocols and decentralized exchanges (DEXes). One example of a DEX is Curve Finance, which is Ethereum’s go-to DEX for stablecoin trading. It may not be the largest DEX in Ethereum’s ecosystem, but Curve has certainly left a mark. This guide will explore Curve and explain what it is, how it works and what it has to offer. We will also address the project’s token, CRV, and potential risks of the project. What is Curve Finance? Curve Finance is a decentralized exchange that runs on Ethereum’s network. It specifically functions as a decentralized liquidity pool for stablecoin trading. Unlike other exchanges, it does not use an order book. Instead, it relies on an Automated Market Maker (AMM) model for matching liquidity. Curve was founded by Michael Egorov, who previously co-founded the crypto infrastructure protocol NuCypher, where he also served as CTO. He also founded LoanCoin — a decentralized loans networ. Before getting into crypto, he studied at the Moscow Institute of Physics and Technology and the Swinburne University of Technology. Curve Finance is very easy to use. All that you need is an Ethereum wallet. Once you have this, you can start swapping different stablecoins at very low trading fees. While Uniswap is Ethereum’s biggest DEX, Curve Finance is still the biggest for stablecoins. What is an AMM? An Automated Market Maker (AMM) is a DEX protocol used for matching liquidity. It’s used by Curve Finance, as well as many other DEXes. Its role is to replace an order book and use a pricing algorithm to price assets. That way, digital assets can be traded using liquidity pools, instead of matching buyers and sellers. How does Curve Finance work? Curve is a fully decentralized and permissionless protocol, run by the Curve DAO. Curve DAO token CRV is used as its native cryptocurrency. Thanks to its decentralized nature, anyone can provide liquidity to one or more pools. Smart contracts are utilized to carry out any swap. Smart contracts contain liquidity granted to the DEX by its community. In return, community members receive rewards for offering their tokens. Meanwhile, the tokens are used to match orders submitted to the exchange. By adopting this method, Curve users are able to swap two or more tokens. These swaps can include paired stablecoins or wrapped tokens with the underlying collateral. Stable liquidity pools Curve Finance was launched in 2020 when the decentralized finance sector initially blew up. It emerged with the intention of creating an AMM exchange with low fees and efficient fiat savings accounts. The DEX focuses on stablecoins, which allows investors to avoid some of the more volatile aspects of the crypto industry. Meanwhile, it still allows investors to earn high-interest rates by using lending protocols. Incentives for liquidity providers Since Curve Finance’s model cannot function without liquidity providers, attracting as many as possible is imperative. This is why Curve offers various incentives to its users. For example, Curve Finance offers lower transaction fees in comparison to its competitors such as Uniswap. They also allow users to earn rewards from outside of Curve. This is possible thanks to so-called interoperable tokens. For example, if DAI is lent out on Compound Finance. DAI tokens are then exchanged for cDAI. Curve users can use cDAI in Curve’s own liquidity pools. Curve is also integrated with other projects, such as Yearsn and Synthetix. This allows liquidity providers to maximize their return on investment, which in turn, encourages users to return to the platform and provide liquidity to Curve. But that’s is not all, as there are more ways to profit from providing liquidity on this platform. These include: Trading fees: Liquidity providers earn profits from fees paid by the platform’s traders; High APY: Annual Percentage Yields (APY) for stablecoin deposits on Curve can go quite high; Yield Farming : Any funds deposited into LPs that end up not being utilized are used in other DeFi protocols for extra income; veCRV token: By locking up Curve’s native CRV token, users receive veCRV. After that, veCRV holders can use the tokens to boost their deposit APY even further; Boosted pools: Some Curve Finance pools offer further incentives for additional liquidity. This may include high yields for LPs, and Curve is known for yield farming of stablecoins. With this at their disposal, Curve liquidity providers can mix and match these income streams how they see fit. It’s in their interest to earn as much as possible in exchange for the use of their tokens. Curve Finance (CRV) token Back in August 2020, Curve Finance began seeking full decentralization through decentralized governance. In order to achieve this, they launched a Decentralized Autonomous Organization, or DAO, for short. Like other DAOs, Curve Finance introduced their native token, CRV. Following the launch of CRV, Curve released a distribution schedule that is expected to be completed by 2026. The total supply of 3.03b is distributed as such: 62% to community liquidity providers 30% to shareholders (team and investors) with 2-4 years vesting 3% to employees with 2 years vesting Curve DAO token, CRV, grants its holders with voting rights, allowing them to vote on various proposals. They can also make proposals themselves, and let the rest of the community vote on it. Anyone with CRV tokens that are vote-locked can propose updates to the protocol. This can include changing the fees, creating new LPs, adjusting rewards for yield farming and more. The CRV token can be purchased or earned from yield farming after the user deposits assets into LPs. As of April 2023, the token has a circulating supply of 807.69 million and its total supply is 1.9 billion. CRV’s trading volume sits at around $50 million and its max supply is capped at 3.3 million. CRV has quite a few use cases within the Curve Finance ecosystem. Apart from being used as a governance token, it also offers LP rewards and boosts yields. On top of that, it is also used for token burns. Burns are generally used to reduce the circulating supply. They are performed by locking up tokens into a separate, one-way smart contract. The risks of Curve Finance While Curve Finance definitely has plenty of advantages, it is also worth addressing its risks. Fortunately, there are not many of them. The project has been audited by Trail of Bits twice and once by Quantstamp. Of course, this doesn’t mean that the project is risk-free, but it’s a good start. One of the biggest risks that Curve faces is its reliance on other DEFI protocols. As the majority of Curve’s liquidity pools are also supplied by other protocols, to generate additional income. If one of those protocols were to face financial difficulties, there could be a chain reaction that would affect many of them. Does Curve Finance have a future? Curve Finance is one of the most popular AMMs on Ethereum. It facilitates high-volume trades of stablecoins and wrapped cryptocurrencies. It offers tight spreads and low slippage, and numerous DeFi protocols rely heavily on it. As such, it is at the core of Ethereum’s DeFi sector. All of this highly suggests that the project does have a future. There are still risks involved with it, as there are with every crypto project. However, Curve Finance’s chances of remaining popular and operational are still quite good. FAQs What is Curve in crypto? Curve is a decentralized exchange and an AMM protocol that facilitates stablecoin swaps. It also supports swaps of wrapped cryptos. On top of that, it is integrated with a number of other projects in Ethereum’s DeFi sector. How safe is Curve Finance? Curve Finance is as safe as any established cryptocurrency. When dealing with crypto, there are always risks involved. However, the protocol has been audited and is deemed to be a safe platform to use. Who founded Curve Finance? Curve was founded by Michael Egorov. Before founding it, Egorov worked on several other projects in the crypto industry. Is Curve fee free? Curve does not offer zero fees. However, its fees are still quite low in comparison to other similar projects. Is Curve a real bank? Curve Finance is not a bank, but rather a DEX that offers yield farming. Its primary role is to offer stablecoin and wrapped crypto swaps. However, by becoming a liquidity pool provider, you can earn passive income from your dealings with the project.',
'clean_content': '<div><p>Ethereum’s network is the home to a wide range of unique projects. Ever since it created the ERC-20 token model, thousands of tokens have been launched. In time, new products have emerged as well, such as dApps, decentralized finance (DeFi) protocols and decentralized exchanges (DEXes). </p><p>One example of a DEX is Curve Finance, which is Ethereum’s go-to DEX for stablecoin trading. It may not be the largest DEX in Ethereum’s ecosystem, but Curve has certainly left a mark. This guide will explore Curve and explain what it is, how it works and what it has to offer. We will also address the project’s token, CRV, and potential risks of the project.</p><h2>What is Curve Finance?</h2><p>Curve Finance is a decentralized exchange that runs on Ethereum’s network. It specifically functions as a decentralized liquidity pool for stablecoin trading. Unlike other exchanges, it does not use an order book. Instead, it relies on an Automated Market Maker (AMM) model for matching liquidity. </p><p>Curve was founded by Michael Egorov, who previously co-founded the crypto infrastructure protocol NuCypher, where he also served as CTO. He also founded LoanCoin — a decentralized loans networ. Before getting into crypto, he studied at the Moscow Institute of Physics and Technology and the Swinburne University of Technology.</p><p>Curve Finance is very easy to use. All that you need is an Ethereum wallet. Once you have this, you can start swapping different stablecoins at very low trading fees. While Uniswap is Ethereum’s biggest DEX, Curve Finance is still the biggest for stablecoins.</p><h2>What is an AMM?</h2><p>An Automated Market Maker (AMM) is a DEX protocol used for matching liquidity. It’s used by Curve Finance, as well as many other DEXes. Its role is to replace an order book and use a pricing algorithm to price assets. That way, digital assets can be traded using liquidity pools, instead of matching buyers and sellers. </p><h2>How does Curve Finance work?</h2><p>Curve is a fully decentralized and permissionless protocol, run by the Curve DAO. Curve DAO token CRV is used as its native cryptocurrency. Thanks to its decentralized nature, anyone can provide liquidity to one or more pools. Smart contracts are utilized to carry out any swap.</p><p>Smart contracts contain liquidity granted to the DEX by its community. In return, community members receive rewards for offering their tokens. Meanwhile, the tokens are used to match orders submitted to the exchange. By adopting this method, Curve users are able to swap two or more tokens. These swaps can include paired stablecoins or wrapped tokens with the underlying collateral. </p><h2>Stable liquidity pools</h2><p>Curve Finance was launched in 2020 when the decentralized finance sector initially blew up. It emerged with the intention of creating an AMM exchange with low fees and efficient fiat savings accounts. The DEX focuses on stablecoins, which allows investors to avoid some of the more volatile aspects of the crypto industry. Meanwhile, it still allows investors to earn high-interest rates by using lending protocols. </p><h2>Incentives for liquidity providers</h2><p>Since Curve Finance’s model cannot function without liquidity providers, attracting as many as possible is imperative. This is why Curve offers various incentives to its users. For example, Curve Finance offers lower transaction fees in comparison to its competitors such as Uniswap. They also allow users to earn rewards from outside of Curve. This is possible thanks to so-called interoperable tokens. For example, if DAI is lent out on Compound Finance. DAI tokens are then exchanged for cDAI. Curve users can use cDAI in Curve’s own liquidity pools. </p><p>Curve is also integrated with other projects, such as Yearsn and Synthetix. This allows liquidity providers to maximize their return on investment, which in turn, encourages users to return to the platform and provide liquidity to Curve. </p><p>But that’s is not all, as there are more ways to profit from providing liquidity on this platform. These include:</p><ul><li>Trading fees: Liquidity providers earn profits from fees paid by the platform’s traders;</li><li>High APY: Annual Percentage Yields (APY) for stablecoin deposits on Curve can go quite high;</li><li>Yield Farming : Any funds deposited into LPs that end up not being utilized are used in other DeFi protocols for extra income; </li><li>veCRV token: By locking up Curve’s native CRV token, users receive veCRV. After that, veCRV holders can use the tokens to boost their deposit APY even further;</li><li>Boosted pools: Some Curve Finance pools offer further incentives for additional liquidity. This may include high yields for LPs, and Curve is known for yield farming of stablecoins.</li></ul><p>With this at their disposal, Curve liquidity providers can mix and match these income streams how they see fit. It’s in their interest to earn as much as possible in exchange for the use of their tokens.</p><h2>Curve Finance (CRV) token</h2><p>Back in August 2020, Curve Finance began seeking full decentralization through decentralized governance. In order to achieve this, they launched a Decentralized Autonomous Organization, or DAO, for short. Like other DAOs, Curve Finance introduced their native token, CRV.</p><p>Following the launch of CRV, Curve released a distribution schedule that is expected to be completed by 2026. </p><figure><img src="https://static.okx.com/cdn/assets/plugins/contentful/4nqoo8goeymu/77FafUZE1sjddle2cvbVwT/a02397f818dac7686303ee8da38afad0/Crv.jpg" /></figure><p>The total supply of 3.03b is distributed as such:</p><ul><li>62% to community liquidity providers</li><li>30% to shareholders (team and investors) with 2-4 years vesting</li><li>3% to employees with 2 years vesting</li></ul><p>Curve DAO token, CRV, grants its holders with voting rights, allowing them to vote on various proposals. They can also make proposals themselves, and let the rest of the community vote on it. Anyone with CRV tokens that are vote-locked can propose updates to the protocol. This can include changing the fees, creating new LPs, adjusting rewards for yield farming and more.</p><p>The CRV token can be purchased or earned from yield farming after the user deposits assets into LPs. </p><figure><img src="https://static.okx.com/cdn/assets/plugins/contentful/4nqoo8goeymu/lWtnJYgt2NuvZ0c841C4k/07de91ea5e7a530dbc006f97dc5a213b/Curve.jpg" /></figure><p>As of April 2023, the token has a circulating supply of 807.69 million and its total supply is 1.9 billion. CRV’s trading volume sits at around $50 million and its max supply is capped at 3.3 million.</p><p>CRV has quite a few use cases within the Curve Finance ecosystem. Apart from being used as a governance token, it also offers LP rewards and boosts yields. On top of that, it is also used for token burns. Burns are generally used to reduce the circulating supply. They are performed by locking up tokens into a separate, one-way smart contract. </p><h2>The risks of Curve Finance</h2><p>While Curve Finance definitely has plenty of advantages, it is also worth addressing its risks. Fortunately, there are not many of them. The project has been audited by Trail of Bits twice and once by Quantstamp. Of course, this doesn’t mean that the project is risk-free, but it’s a good start. </p><p>One of the biggest risks that Curve faces is its reliance on other DEFI protocols. As the majority of Curve’s liquidity pools are also supplied by other protocols, to generate additional income. If one of those protocols were to face financial difficulties, there could be a chain reaction that would affect many of them.</p><h2>Does Curve Finance have a future?</h2><p>Curve Finance is one of the most popular AMMs on Ethereum. It facilitates high-volume trades of stablecoins and wrapped cryptocurrencies. It offers tight spreads and low slippage, and numerous DeFi protocols rely heavily on it. As such, it is at the core of Ethereum’s DeFi sector.</p><p>All of this highly suggests that the project does have a future. There are still risks involved with it, as there are with every crypto project. However, Curve Finance’s chances of remaining popular and operational are still quite good.</p><h2>FAQs</h2><h2>What is Curve in crypto?</h2><p>Curve is a decentralized exchange and an AMM protocol that facilitates stablecoin swaps. It also supports swaps of wrapped cryptos. On top of that, it is integrated with a number of other projects in Ethereum’s DeFi sector.</p><h2>How safe is Curve Finance?</h2><p>Curve Finance is as safe as any established cryptocurrency. When dealing with crypto, there are always risks involved. However, the protocol has been audited and is deemed to be a safe platform to use.</p><h2>Who founded Curve Finance?</h2><p>Curve was founded by Michael Egorov. Before founding it, Egorov worked on several other projects in the crypto industry. </p><h2>Is Curve fee free?</h2><p>Curve does not offer zero fees. However, its fees are still quite low in comparison to other similar projects.</p><h2>Is Curve a real bank?</h2><p>Curve Finance is not a bank, but rather a DEX that offers yield farming. Its primary role is to offer stablecoin and wrapped crypto swaps. However, by becoming a liquidity pool provider, you can earn passive income from your dealings with the project.</p></div>',
'content_list': [{'type': 'text',
'data': 'Ethereum’s network is the home to a wide range of unique projects. Ever since it created the ERC-20 token model, thousands of tokens have been launched. In time, new products have emerged as well, such as dApps, decentralized finance (DeFi) protocols and decentralized exchanges (DEXes).',
'caption': ''},
{'type': 'text',
'data': 'One example of a DEX is Curve Finance, which is Ethereum’s go-to DEX for stablecoin trading. It may not be the largest DEX in Ethereum’s ecosystem, but Curve has certainly left a mark. This guide will explore Curve and explain what it is, how it works and what it has to offer. We will also address the project’s token, CRV, and potential risks of the project.',
'caption': ''},
{'type': 'text', 'data': 'What is Curve Finance?', 'caption': ''},
{'type': 'text',
'data': 'Curve Finance is a decentralized exchange that runs on Ethereum’s network. It specifically functions as a decentralized liquidity pool for stablecoin trading. Unlike other exchanges, it does not use an order book. Instead, it relies on an Automated Market Maker (AMM) model for matching liquidity.',
'caption': ''},
{'type': 'text',
'data': 'Curve was founded by Michael Egorov, who previously co-founded the crypto infrastructure protocol NuCypher, where he also served as CTO. He also founded LoanCoin — a decentralized loans networ. Before getting into crypto, he studied at the Moscow Institute of Physics and Technology and the Swinburne University of Technology.',
'caption': ''},
{'type': 'text',
'data': 'Curve Finance is very easy to use. All that you need is an Ethereum wallet. Once you have this, you can start swapping different stablecoins at very low trading fees. While Uniswap is Ethereum’s biggest DEX, Curve Finance is still the biggest for stablecoins.',
'caption': ''},
{'type': 'text', 'data': 'What is an AMM?', 'caption': ''},
{'type': 'text',
'data': 'An Automated Market Maker (AMM) is a DEX protocol used for matching liquidity. It’s used by Curve Finance, as well as many other DEXes. Its role is to replace an order book and use a pricing algorithm to price assets. That way, digital assets can be traded using liquidity pools, instead of matching buyers and sellers.',
'caption': ''},
{'type': 'text', 'data': 'How does Curve Finance work?', 'caption': ''},
{'type': 'text',
'data': 'Curve is a fully decentralized and permissionless protocol, run by the Curve DAO. Curve DAO token CRV is used as its native cryptocurrency. Thanks to its decentralized nature, anyone can provide liquidity to one or more pools. Smart contracts are utilized to carry out any swap.',
'caption': ''},
{'type': 'text',
'data': 'Smart contracts contain liquidity granted to the DEX by its community. In return, community members receive rewards for offering their tokens. Meanwhile, the tokens are used to match orders submitted to the exchange. By adopting this method, Curve users are able to swap two or more tokens. These swaps can include paired stablecoins or wrapped tokens with the underlying collateral.',
'caption': ''},
{'type': 'text', 'data': 'Stable liquidity pools', 'caption': ''},
{'type': 'text',
'data': 'Curve Finance was launched in 2020 when the decentralized finance sector initially blew up. It emerged with the intention of creating an AMM exchange with low fees and efficient fiat savings accounts. The DEX focuses on stablecoins, which allows investors to avoid some of the more volatile aspects of the crypto industry. Meanwhile, it still allows investors to earn high-interest rates by using lending protocols.',
'caption': ''},
{'type': 'text',
'data': 'Incentives for liquidity providers',
'caption': ''},
{'type': 'text',
'data': 'Since Curve Finance’s model cannot function without liquidity providers, attracting as many as possible is imperative. This is why Curve offers various incentives to its users. For example, Curve Finance offers lower transaction fees in comparison to its competitors such as Uniswap. They also allow users to earn rewards from outside of Curve. This is possible thanks to so-called interoperable tokens. For example, if DAI is lent out on Compound Finance. DAI tokens are then exchanged for cDAI. Curve users can use cDAI in Curve’s own liquidity pools.',
'caption': ''},
{'type': 'text',
'data': 'Curve is also integrated with other projects, such as Yearsn and Synthetix. This allows liquidity providers to maximize their return on investment, which in turn, encourages users to return to the platform and provide liquidity to Curve.',
'caption': ''},
{'type': 'text',
'data': 'But that’s is not all, as there are more ways to profit from providing liquidity on this platform. These include:',
'caption': ''},
{'type': 'text',
'data': 'Trading fees: Liquidity providers earn profits from fees paid by the platform’s traders;',
'caption': ''},
{'type': 'text',
'data': 'High APY: Annual Percentage Yields (APY) for stablecoin deposits on Curve can go quite high;',
'caption': ''},
{'type': 'text',
'data': 'Yield Farming : Any funds deposited into LPs that end up not being utilized are used in other DeFi protocols for extra income;',
'caption': ''},
{'type': 'text',
'data': 'veCRV token: By locking up Curve’s native CRV token, users receive veCRV. After that, veCRV holders can use the tokens to boost their deposit APY even further;',
'caption': ''},
{'type': 'text',
'data': 'Boosted pools: Some Curve Finance pools offer further incentives for additional liquidity. This may include high yields for LPs, and Curve is known for yield farming of stablecoins.',
'caption': ''},
{'type': 'text',
'data': 'With this at their disposal, Curve liquidity providers can mix and match these income streams how they see fit. It’s in their interest to earn as much as possible in exchange for the use of their tokens.',
'caption': ''},
{'type': 'text', 'data': 'Curve Finance (CRV) token', 'caption': ''},
{'type': 'text',
'data': 'Back in August 2020, Curve Finance began seeking full decentralization through decentralized governance. In order to achieve this, they launched a Decentralized Autonomous Organization, or DAO, for short. Like other DAOs, Curve Finance introduced their native token, CRV.',
'caption': ''},
{'type': 'text',
'data': 'Following the launch of CRV, Curve released a distribution schedule that is expected to be completed by 2026.',
'caption': ''},
{'type': 'image',
'data': 'https://static.okx.com/cdn/assets/plugins/contentful/4nqoo8goeymu/77FafUZE1sjddle2cvbVwT/a02397f818dac7686303ee8da38afad0/Crv.jpg',
'caption': ''},
{'type': 'text',
'data': 'The total supply of 3.03b is distributed as such:',
'caption': ''},
{'type': 'text',
'data': '62% to community liquidity providers',
'caption': ''},
{'type': 'text',
'data': '30% to shareholders (team and investors) with 2-4 years vesting',
'caption': ''},
{'type': 'text',
'data': '3% to employees with 2 years vesting',
'caption': ''},
{'type': 'text',
'data': 'Curve DAO token, CRV, grants its holders with voting rights, allowing them to vote on various proposals. They can also make proposals themselves, and let the rest of the community vote on it. Anyone with CRV tokens that are vote-locked can propose updates to the protocol. This can include changing the fees, creating new LPs, adjusting rewards for yield farming and more.',
'caption': ''},
{'type': 'text',
'data': 'The CRV token can be purchased or earned from yield farming after the user deposits assets into LPs.',
'caption': ''},
{'type': 'image',
'data': 'https://static.okx.com/cdn/assets/plugins/contentful/4nqoo8goeymu/lWtnJYgt2NuvZ0c841C4k/07de91ea5e7a530dbc006f97dc5a213b/Curve.jpg',
'caption': ''},
{'type': 'text',
'data': 'As of April 2023, the token has a circulating supply of 807.69 million and its total supply is 1.9 billion. CRV’s trading volume sits at around $50 million and its max supply is capped at 3.3 million.',
'caption': ''},
{'type': 'text',
'data': 'CRV has quite a few use cases within the Curve Finance ecosystem. Apart from being used as a governance token, it also offers LP rewards and boosts yields. On top of that, it is also used for token burns. Burns are generally used to reduce the circulating supply. They are performed by locking up tokens into a separate, one-way smart contract.',
'caption': ''},
{'type': 'text', 'data': 'The risks of Curve Finance', 'caption': ''},
{'type': 'text',
'data': 'While Curve Finance definitely has plenty of advantages, it is also worth addressing its risks. Fortunately, there are not many of them. The project has been audited by Trail of Bits twice and once by Quantstamp. Of course, this doesn’t mean that the project is risk-free, but it’s a good start.',
'caption': ''},
{'type': 'text',
'data': 'One of the biggest risks that Curve faces is its reliance on other DEFI protocols. As the majority of Curve’s liquidity pools are also supplied by other protocols, to generate additional income. If one of those protocols were to face financial difficulties, there could be a chain reaction that would affect many of them.',
'caption': ''},
{'type': 'text', 'data': 'Does Curve Finance have a future?', 'caption': ''},
{'type': 'text',
'data': 'Curve Finance is one of the most popular AMMs on Ethereum. It facilitates high-volume trades of stablecoins and wrapped cryptocurrencies. It offers tight spreads and low slippage, and numerous DeFi protocols rely heavily on it. As such, it is at the core of Ethereum’s DeFi sector.',
'caption': ''},
{'type': 'text',
'data': 'All of this highly suggests that the project does have a future. There are still risks involved with it, as there are with every crypto project. However, Curve Finance’s chances of remaining popular and operational are still quite good.',
'caption': ''},
{'type': 'text', 'data': 'FAQs', 'caption': ''},
{'type': 'text', 'data': 'What is Curve in crypto?', 'caption': ''},
{'type': 'text',
'data': 'Curve is a decentralized exchange and an AMM protocol that facilitates stablecoin swaps. It also supports swaps of wrapped cryptos. On top of that, it is integrated with a number of other projects in Ethereum’s DeFi sector.',
'caption': ''},
{'type': 'text', 'data': 'How safe is Curve Finance?', 'caption': ''},
{'type': 'text',
'data': 'Curve Finance is as safe as any established cryptocurrency. When dealing with crypto, there are always risks involved. However, the protocol has been audited and is deemed to be a safe platform to use.',
'caption': ''},
{'type': 'text', 'data': 'Who founded Curve Finance?', 'caption': ''},
{'type': 'text',
'data': 'Curve was founded by Michael Egorov. Before founding it, Egorov worked on several other projects in the crypto industry.',
'caption': ''},
{'type': 'text', 'data': 'Is Curve fee free?', 'caption': ''},
{'type': 'text',
'data': 'Curve does not offer zero fees. However, its fees are still quite low in comparison to other similar projects.',
'caption': ''},
{'type': 'text', 'data': 'Is Curve a real bank?', 'caption': ''},
{'type': 'text',
'data': 'Curve Finance is not a bank, but rather a DEX that offers yield farming. Its primary role is to offer stablecoin and wrapped crypto swaps. However, by becoming a liquidity pool provider, you can earn passive income from your dealings with the project.',
'caption': ''}],
'summary': 'Ethereum’s network is the home to a wide range of unique projects. Ever since it created the ERC-20 token model, thousands of tokens have been launched. In time, new products have emerged as well, such as dApps, decentralized finance (DeFi) protocols and decentralized exchanges (DEXes). One example of a...',
'canonical_url': 'https://www.okx.com/learn/curve-finance-guide',
'image_count': 2,
'image_urls': ['https://static.okx.com/cdn/assets/plugins/contentful/4nqoo8goeymu/77FafUZE1sjddle2cvbVwT/a02397f818dac7686303ee8da38afad0/Crv.jpg',
'https://static.okx.com/cdn/assets/plugins/contentful/4nqoo8goeymu/lWtnJYgt2NuvZ0c841C4k/07de91ea5e7a530dbc006f97dc5a213b/Curve.jpg'],
'image_captions': ['', ''],
'head_meta': {'og:type': 'article',
'description': 'Ethereum’s network is the home',
'og:description': '',
'twitter:image': 'https://static.okx.com/cdn/assets/plugins/contentful/4nqoo8goeymu/56aHhyers8WrWwWSE6M0x3/5c15ce05044a4cfa63f86453cbf86e35/MP_Cover.png',
'viewport': 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no',
'Author': 'OKX',
'og:site_name': 'OKX',
'keywords': 'BTC, BTC trading platform, ETH, EOS, Qtum, NEO, Ripple, BTC price, LTC, BCH, ETC, Blockchain',
'og:image': 'https://static.okx.com/cdn/assets/plugins/contentful/4nqoo8goeymu/56aHhyers8WrWwWSE6M0x3/5c15ce05044a4cfa63f86453cbf86e35/MP_Cover.png',
'browsermode': 'application',
'og:locale': 'en_US',
'twitter:site': '@okx',
'og:url': 'https://www.okx.com/learn/curve-finance-guide',
'og:title': 'Exploring Curve Finance: A comprehensive guide',
'x5-orientation': 'portrait',
'x5-page-mode': 'app',
'google-site-verification': 'SVJL-WGbe8_1J05O3I8V4ehAs8L89UDA-bcAyAJ2SLw',
'full-screen': 'yes',
'twitter:title': 'Exploring Curve Finance: A comprehensive guide',
'twitter:card': 'summary_large_image',
'apple-mobile-web-app-capable': 'yes',
'x5-fullscreen': 'true',
'Copyright': 'okx.com',
'twitter:description': 'Ethereum’s network is the home'},
'author': ['OKX'],
'timezone': '',
'url': 'https://www.okx.com/learn/curve-finance-guide',
'amp_url': '',
'breadcrumb': [{'level': 0,
'text': 'Learn',
'link': 'https://www.okx.com/learn'},
{'level': 1,
'text': 'Glossary',
'link': 'https://www.okx.com/learn/category/blockchain-glossary'},
{'level': 2, 'text': 'Article', 'link': ''}]}

上传HTML片段

GnePro在解析文章页时,会使用多种方式自动检测页面上的标题,发布时间正文.这三者缺一不可.如果所有方式都无法找其这三个元素,就会解析失败.如果你的HTML只有一个片段,那么为了让解析能够成功,你需要使用如下模板拼接出完整的HTML:

1
2
3
4
5
6
7
8
9
10
11
12
 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h1>我是假标题</h1>
{你的HTML片段}
</body>
</html>

然后把这个拼接完成的HTML传给上一小节的接口来进行解析.

返回字段说明

返回字段的意义如下:

  • title: 新闻标题
  • publish_time_ts: 发布时间的时间戳,精确到秒
  • publish_time: 发布时间,格式为YYYY-mm-dd HH:MM:SS
  • content: 纯文本形式的正文(段落会被压缩)
  • clean_content: 精简以后的正文HTML
  • content_list: 按段落和图片划分的正文列表.使用这个字段你可以很方便地把正文和图片的相对位置去分开
  • summary:正文的前300个字符
  • image_count: 正文中图片的数量
  • image_urls: 正文中图片的url列表
  • image_captions: 正文图片的标题列表
  • head_meta: html中的元信息
  • author: 作者
  • url: 页面的url.如果页面经过多次跳转,这个url为最终url
  • breadcrumb: 面包屑

如何试用

如果你对GnePro有需要,你可以扫描下面的二维码加我微信,我可以给你开试用帐号.