From 7b82640a8f390bc4eb6bd2ac30f2b2e5d5fc73ef Mon Sep 17 00:00:00 2001 From: Antoine El Choueiri Date: Wed, 24 Aug 2022 16:10:35 +0300 Subject: [PATCH] feat: add netease extractor --- dist/mercury.js | 32 +- fixtures/www.163.com/1660814937204.html | 2203 +++++++++++++++++ src/extractors/custom/index.js | 1 + src/extractors/custom/www.163.com/index.js | 40 + .../custom/www.163.com/index.test.js | 65 + 5 files changed, 2340 insertions(+), 1 deletion(-) create mode 100644 fixtures/www.163.com/1660814937204.html create mode 100644 src/extractors/custom/www.163.com/index.js create mode 100644 src/extractors/custom/www.163.com/index.test.js diff --git a/dist/mercury.js b/dist/mercury.js index 3e363aac5..de3919e1b 100644 --- a/dist/mercury.js +++ b/dist/mercury.js @@ -6139,6 +6139,35 @@ var SpektrumExtractor = { } }; +var Www163ComExtractor = { + domain: 'www.163.com', + title: { + selectors: [['meta[property="og:title"]', 'content'], '.post_title'] + }, + author: { + selectors: [['meta[name="author"]', 'content'], ['meta[property="article:author"]', 'content'], '.post_author'] + }, + date_published: { + selectors: [['meta[property="article:published_time"]', 'content']] + }, + dek: { + selectors: [] + }, + lead_image_url: { + selectors: ['p.f_center img'] + }, + content: { + selectors: ['.post_body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [] + } +}; + var CustomExtractors = /*#__PURE__*/Object.freeze({ @@ -6285,7 +6314,8 @@ var CustomExtractors = /*#__PURE__*/Object.freeze({ WwwEngadgetComExtractor: WwwEngadgetComExtractor, ArstechnicaComExtractor: ArstechnicaComExtractor, WwwNdtvComExtractor: WwwNdtvComExtractor, - SpektrumExtractor: SpektrumExtractor + SpektrumExtractor: SpektrumExtractor, + Www163ComExtractor: Www163ComExtractor }); var Extractors = _Object$keys(CustomExtractors).reduce(function (acc, key) { diff --git a/fixtures/www.163.com/1660814937204.html b/fixtures/www.163.com/1660814937204.html new file mode 100644 index 000000000..94d3f405f --- /dev/null +++ b/fixtures/www.163.com/1660814937204.html @@ -0,0 +1,2203 @@ + + + + + 破解难题!西安交大团队开发出高密度固态储氢材料:安全可控,稳定释氢|氢能|纳米|石墨烯|氢气_网易订阅 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+ + 快速导航 + + + + + +
+
+
+ + + + + + + + + + + + +
+
+
+
+ + +
+
+
+
+ + + +
+
+ +
+
+ +
+
+
+ +
+ 网易首页 > 网易号 > 正文 + 申请入驻 + + + +
+

破解难题!西安交大团队开发出高密度固态储氢材料:安全可控,稳定释氢

+ + + + + +
+
+
+ + 0 +
+
+ 分享至 +
    + + + +
+ +
+
+ +
+

氢是一种无污染的能源,它可以从水中提取,无需消耗化石燃料,而且可广泛应用于航空航天、陆运水运等领域。不过,氢气易燃易爆,十分危险——突破储氢技术瓶颈成为了一大关键点。

传统的氢气储运,以及常用的低温液态法,都存在一定的难题和漏洞,对容器质量、环境条件要求严苛,甚至成本昂贵。

针对这些问题,西安交通大学电气学院张锦英教授团队,近期开发出了一种石墨烯界面纳米阀固态储氢材料。



他们以高活性轻金属氢化物为原材料,在不同组分界面建立石墨烯界面纳米阀结构,通过界面纳米阀非催化动力学调控机制实现储氢材料安全、可控、稳定释氢。

同时,该界面纳米阀结构能有效隔绝水氧,杜绝氢气自发泄漏,提高材料的储运安全性,避免了使用笨重的高压金属罐或者添加额外的保护装置来进行运输,极大地提高了材料便携性和系统储氢密度。

这一成果,还克服了氢气低温释放的行业性难题,实现了石墨烯界面纳米阀固态储氢材料在-40~85℃宽温度范围稳定工作,并成功在50W、200W和1000W燃料电池系统上进行了不同载荷验证。

据悉,目前该团队正在进行基于此新型储氢技术的便携式氢能电源、无人机、氢能源电动车等产品的设计和开发。

数据显示,中国氢能市场发展初期(2020-2025年左右),氢气年均需求约2200万吨;氢能市场发展中期(2030年左右),氢气年均需求约3500万吨;氢能市场发展远期(2050年左右),氢气年均需求约6000万吨。



立足学术前沿,远瞻产业发展。更多数据请参考前瞻产业研究院《2021-2026年中国氢能源行业发展前景预测与投资战略规划分析报告》,同时前瞻产业研究院提供产业大数据、产业规划、产业申报、产业园区规划、产业招商引资、IPO募投可研、招股说明书撰写等解决方案。

+
+
+ + +

特别声明:以上内容(如有图片或视频亦包括在内)为自媒体平台“网易号”用户上传并发布,本平台仅提供信息存储服务。

+

Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.

+ +
+ + + + + + + +
+
+
+ + + + +
+ +
+
+
相关推荐
+
热点推荐
+
+
+ +
+
+
+
+ + 96岁杨振宁喜添千金?网友怒骂滚出中国!英雄被辱是时代悲哀 + +

+ 96岁杨振宁喜添千金?网友怒骂滚出中国!英雄被辱是时代悲哀 +

+ 星星扒皮 +
2022-08-17 23:12:05
+
+
+ + 台网友办签证懵了,选项不仅没“台湾”,连“中华台北”也没了 + +

+ 台网友办签证懵了,选项不仅没“台湾”,连“中华台北”也没了 +

+ 青丝茧 +
2022-08-18 13:04:24
+
+
+ + 中美元首即将会晤,为何又是由美国宣布?直接提前三个月! + +

+ 中美元首即将会晤,为何又是由美国宣布?直接提前三个月! +

+ 梁子谦说 +
2022-08-18 10:06:29
+
+
+ + 劳荣枝执行死刑前的最后一天发生了什么?(微小说) + +

+ 劳荣枝执行死刑前的最后一天发生了什么?(微小说) +

+ 素雅文人 +
2022-08-18 10:39:28
+
+
+ + 网红海象被杀内情:全因接近挪威富人区;欧洲动保齐装死 + +

+ 网红海象被杀内情:全因接近挪威富人区;欧洲动保齐装死 +

+ 新欧洲 +
2022-08-17 22:49:43
+
+
+ + 青海大通县山洪灾害亲历者:数百只猪牛被冲走,当地仍在下雨   + +

+ 青海大通县山洪灾害亲历者:数百只猪牛被冲走,当地仍在下雨 +

+ 南方都市报 +
2022-08-18 15:36:09
+
+
+ + 二战时期,德军机枪手惨死在战壕里,眼部有一个洞被狙击枪打死的 + +

+ 二战时期,德军机枪手惨死在战壕里,眼部有一个洞被狙击枪打死的 +

+ 小怡的愉快旅行 +
2022-08-18 15:26:06
+
+
+ + 赌窝提供“星级服务”,女子与几名男子大战,三个昼夜仍不知疲倦 + +

+ 赌窝提供“星级服务”,女子与几名男子大战,三个昼夜仍不知疲倦 +

+ 杨样说史 +
2022-08-18 14:30:23
+
+
+ + 任正非路过华为实验室,发现高薪聘请的年轻工程师在打游戏,推门问道:电脑打游戏卡吗?工程师:研发重地,非请勿进! + +

+ 任正非路过华为实验室,发现高薪聘请的年轻工程师在打游戏,推门问道:电脑打游戏卡吗?工程师:研发重地,非请勿进! +

+ 科技学术派 +
2022-08-18 14:29:41
+
+
+ + 18年男孩考660分,遭继母改志愿被职高录取,父亲转头和前妻复婚 + +

+ 18年男孩考660分,遭继母改志愿被职高录取,父亲转头和前妻复婚 +

+ 寄予看社会 +
2022-08-17 19:14:51
+
+
+ + 2011年,国际油轮触礁成功获救,却不给救援费,官司一打就是5年 + +

+ 2011年,国际油轮触礁成功获救,却不给救援费,官司一打就是5年 +

+ 枕猫 +
2022-08-14 22:32:54
+
+
+ + 突发!一日暴增3424例!多地宣布延迟开学!教育部紧急通知:致广大师生及家长的一封信 + +

+ 突发!一日暴增3424例!多地宣布延迟开学!教育部紧急通知:致广大师生及家长的一封信 +

+ 薛定喵 +
2022-08-18 11:41:31
+
+
+ + 比芯片断供还要可怕?美国突然宣布,中国院士说对了 + +

+ 比芯片断供还要可怕?美国突然宣布,中国院士说对了 +

+ 海豚游娱乐 +
2022-08-18 00:30:45
+
+
+ + 2020年广东环卫女工被上司骚扰4年,将其举报,上司:只是开玩笑 + +

+ 2020年广东环卫女工被上司骚扰4年,将其举报,上司:只是开玩笑 +

+ 寄予看社会 +
2022-08-18 16:23:47
+
+
+ + 今年停电真的是因为一盘大棋,可是又没人信了 + +

+ 今年停电真的是因为一盘大棋,可是又没人信了 +

+ 基本常识 +
2022-08-18 14:12:17
+
+
+ + “专家”建议取消中餐打荷!厨师炸了! + +

+ “专家”建议取消中餐打荷!厨师炸了! +

+ 红厨网 +
2022-08-18 10:18:02
+
+
+ + 一张让全世界都憎恨日本的照片,日军曾高价悬赏通缉中国该摄影师 + +

+ 一张让全世界都憎恨日本的照片,日军曾高价悬赏通缉中国该摄影师 +

+ 弦心兔芝 +
2022-08-18 10:50:25
+
+
+ + 女生隐私部位有多少种形状? + +

+ 女生隐私部位有多少种形状? +

+ 生命宝典 +
2022-08-17 15:10:02
+
+
+ + 忽悠俄罗斯人可以,忽悠全世界就不灵了 + +

+ 忽悠俄罗斯人可以,忽悠全世界就不灵了 +

+ 凡事一定有办法13119 +
2022-08-18 12:43:23
+
+
+ + 高考800多分!人大毕业今流浪街头,父母:他扔掉手机全国溜达 + +

+ 高考800多分!人大毕业今流浪街头,父母:他扔掉手机全国溜达 +

+ 议史纪 +
2022-08-18 14:30:02
+
+ 2022-08-18 17:24:49 +
+
+
+
+
+ +
+
+ + 前瞻网 + +
+ + + +
前瞻网
+
中国产业科技深度服务平台
+
+ 164596文章数 + 355499关注度 +
+
往期回顾 全部
+
    +
+
+ + + +
+
+ +
+
+ +
+
+
+
+

科技要闻

+
+ + +

恒大回应恒驰汽车被并购传闻:正积极引入战投

+
+
+ +
+ +
+
+ +
+
+ +
+
+
+
+

头条要闻

+
+ + +

欧洲或发起对华贸易战?德总理呼吁德企别过于依赖中国

+ +
+
+ +
+
+

头条要闻

+
+ + +

欧洲或发起对华贸易战?德总理呼吁德企别过于依赖中国

+ +
+
+ +
+ + +
+
+ +
+
+ +
+
+
+
+

体育要闻

+
+ + +

新疆人打造中国的"灌篮高手湘北传奇"

+
+
+ +
+ +
+
+ +
+
+ +
+
+
+
+

娱乐要闻

+
+ + +

关晓彤"二十不惑2"拿下卫视收视冠军

+
+
+ +
+ + +
+
+ +
+
+ +
+
+
+
+

财经要闻

+
+ + +
+ + +
+
+ +
+
+ +
+
+
+
+

汽车要闻

+
+ + +

这台科幻座驾预售60万起 高合HiPhi Z将上市

+
+
+ +
+ + +
+
+ +
+
+ +
+
+
+ +
+

态度原创

+
    +
+
+ + + +
+
+ +
+
+ +
+
+
+ + + +
+
+ + +
+ + 手机 +
+ + +
+ + 本地 +
+ + +
+ + 数码 +
+ + +
+ + 房产 +
+ + +
+ + 公开课 +
+ +
+
+ + +
+
+

手机要闻

+
+ + +

iOS 15.6.1正式版发布:解决2大问题,赶快升级

+
+
+ +
+ +
+ + +
+
+

本地新闻

+
+ + +

江浙沪人夏天的命,多半是它给的

+
+
+ +
+ +
+ + +
+
+

数码要闻

+
+ + +

曝苹果计划于9月7日举行iPhone 14、Apple Watch发布会

+
+
+ +
+ +
+ + +
+
+

房产要闻

+
+ + +

均价2.2万/㎡,顺义金港嘉园本周六第二次递补选房

+
+
+ +
+ +
+ + +
+
+

公开课

+
+

南宋灭亡时有多惨烈?皇帝投海军民殉国

+
+ +
+
+ +
+
+ +
+ + + + + + + + +
+ +
+
+ +
+ +
+
+ +
+
+ +
+
+ + + + + + +进入关怀模式 + + + + + + + + + + \ No newline at end of file diff --git a/src/extractors/custom/index.js b/src/extractors/custom/index.js index 0fe770046..f1683753d 100644 --- a/src/extractors/custom/index.js +++ b/src/extractors/custom/index.js @@ -142,3 +142,4 @@ export * from './www.engadget.com'; export * from './arstechnica.com'; export * from './www.ndtv.com'; export * from './www.spektrum.de'; +export * from './www.163.com'; diff --git a/src/extractors/custom/www.163.com/index.js b/src/extractors/custom/www.163.com/index.js new file mode 100644 index 000000000..1ad9dfc07 --- /dev/null +++ b/src/extractors/custom/www.163.com/index.js @@ -0,0 +1,40 @@ +export const Www163ComExtractor = { + domain: 'www.163.com', + + title: { + selectors: [['meta[property="og:title"]', 'content'], '.post_title'], + }, + + author: { + selectors: [ + ['meta[name="author"]', 'content'], + ['meta[property="article:author"]', 'content'], + '.post_author', + ], + }, + + date_published: { + selectors: [['meta[property="article:published_time"]', 'content']], + }, + + dek: { + selectors: [], + }, + + lead_image_url: { + selectors: ['p.f_center img'], + }, + + content: { + selectors: ['.post_body'], + + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, +}; diff --git a/src/extractors/custom/www.163.com/index.test.js b/src/extractors/custom/www.163.com/index.test.js new file mode 100644 index 000000000..07e7089b9 --- /dev/null +++ b/src/extractors/custom/www.163.com/index.test.js @@ -0,0 +1,65 @@ +import assert from 'assert'; +import URL from 'url'; +// import cheerio from 'cheerio'; + +import Mercury from 'mercury'; +import getExtractor from 'extractors/get-extractor'; +// import { excerptContent } from 'utils/text'; + +const fs = require('fs'); + +describe('Www163ComExtractor', () => { + describe('initial test case', () => { + let result; + let url; + beforeAll(() => { + url = 'https://www.163.com/dy/article/GA1LTCMN051480KF.html'; + const html = fs.readFileSync('./fixtures/www.163.com/1660814937204.html'); + result = Mercury.parse(url, { html, fallback: false }); + }); + + it('is selected properly', () => { + // This test should be passing by default. + // It sanity checks that the correct parser + // is being selected for URLs from this domain + const extractor = getExtractor(url); + assert.equal(extractor.domain, URL.parse(url).hostname); + }); + + it('returns the title', async () => { + // To pass this test, fill out the title selector + // in ./src/extractors/custom/www.163.com/index.js. + const { title } = await result; + + // Update these values with the expected values from + // the article. + assert.equal( + title, + `破解难题!西安交大团队开发出高密度固态储氢材料:安全可控,稳定释氢` + ); + }); + + it('returns the date_published', async () => { + // To pass this test, fill out the date_published selector + // in ./src/extractors/custom/www.163.com/index.js. + const { date_published } = await result; + + // Update these values with the expected values from + // the article. + assert.equal(date_published, `2021-05-15T03:36:10.000Z`); + }); + + it('returns the lead_image_url', async () => { + // To pass this test, fill out the lead_image_url selector + // in ./src/extractors/custom/www.163.com/index.js. + const { lead_image_url } = await result; + + // Update these values with the expected values from + // the article. + assert.equal( + lead_image_url, + 'https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2021%2F0515%2F8b37ab4aj00qt4q08003qc000hs00b2g.jpg&thumbnail=660x2147483647&quality=80&type=jpg' + ); + }); + }); +});