文章 "使用CSS选择器从HTML页面提取结构化数据"

 

新文章 使用CSS选择器从HTML页面提取结构化数据已发布:

本文描述了一种通用的基于CSS选择器的HTML文档数据分析和转换方法。交易报告、测试报告、您最喜欢的经济日历、公共信号、账户监控和其他在线报价源将直接从MQL获得。

交易者通常处理一些标准的HTML文件,例如测试报告和由MetaTrader生成的交易报告。我们有时会从其他交易者那里收到这样的文件,或者从互联网上下载这些文件,并希望在图表上可视化数据,以便进一步分析。为此,HTML中的数据应转换为表格视图(简单情况下转换为CSV格式)。

我们实用程序中的CSS选择器可以自动执行这个过程。

让我们看看HTML文件的内部。以下是MetaTrader 5交易报告的外观和HTML代码的一部分(ReportHistory.html文件附在下面)。

交易报告外观及部分HTML代码

作者:Stanislav Korotky

 

Excuse me, is this html css selector not available now?

I downloaded the source code, but found that the writing method cannot be compiled.

 
Kaijun Wang #:

Excuse me, is this html css selector not available now?

I downloaded the source code, but found that the writing method cannot be compiled.

MQL5 is constantly changing, which often breaks compatibility with existing source codes.

Try this one (attached).

附加的文件:
原因: