【发布时间】:2018-12-03 04:20:57
【问题描述】:
我想从http://mbsweblist.fsco.gov.on.ca/ShowLicence.aspx?M13000248~ 中提取代理/经纪人名称、许可证号和到期日期
“M”后面的数值是许可证号。 我有权力查询来提取几个许可证的数据。如何提取 list = {00000000..99999999} 的数据? PowerBI 不适合这个目的吗?还有其他方法吗?
谢谢你,感谢你的帮助。
(page as number) as table =>
let
Source = Web.Page(Web.Contents("http://mbsweblist.fsco.gov.on.ca/ShowLicence.aspx?M"&Number.ToText(page)&"~")),
Data1 = Source{1}[Data],
#"Changed Type" = Table.TransformColumnTypes(Data1,{{"Column1", type text}, {"Column2", type text}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Column1] = "Agent/Broker Name:" or [Column1] = "Expiry Date:" or [Column1] = "Licence #:"))
in
#"Filtered Rows"
let
Source = {18001928,13000248},
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Page"}}),
#"Added Custom" = Table.AddColumn(#"Renamed Columns", "Custom", each GetData([Page])),
#"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Column1", "Column2"}, {"Custom.Column1", "Custom.Column2"})
in
#"Expanded Custom"
【问题讨论】:
标签: web-scraping powerbi