如何使用python从HTTPSConnection获取表数据

时间:2017-12-29 14:09:26

标签: python asp.net json http web-scraping

我希望您帮助我从Httpsconnection获取数据 由于网页是ASP.Net,无法从美丽的汤目录中检索数据,我实现了以下代码:

import http.client
import requests
from urllib.request import urlopen
from bs4 import BeautifulSoup

conn = http.client.HTTPSConnection("www.moj.gov.sa")

payload = "{\"renderRequestRecord\":{\"ConnectionRecords\":[{\"ProviderId\":\"pps_f189f23c613647cd8d4b15bc410f7a0b\",\"ProviderParameterName\":\"FilterValues\",\"ConsumerId\":\"pps_075201e3c37b45e58826b34b823f3fde\",\"ProviderConnectionPointId\":\"TransformableBIDataProvider\",\"ConsumerConnectionPointId\":\"BIDataProvider\",\"TransformerId\":\"959c2a24-b9bb-4c2b-a91a-9e2abcc0bd61\"},{\"ProviderId\":\"pps_bc4df99f7ddf4407b566bcb3f37376f4\",\"ProviderParameterName\":\"FilterValues\",\"ConsumerId\":\"pps_075201e3c37b45e58826b34b823f3fde\",\"ProviderConnectionPointId\":\"TransformableBIDataProvider\",\"ConsumerConnectionPointId\":\"BIDataProvider\",\"TransformerId\":\"f53b6688-9102-40d8-8cb5-d77432c3779d\"},{\"ProviderId\":\"pps_e9c13243c2764ce7b21a9a5edc1247cd\",\"ProviderParameterName\":\"FilterValues\",\"ConsumerId\":\"pps_075201e3c37b45e58826b34b823f3fde\",\"ProviderConnectionPointId\":\"TransformableBIDataProvider\",\"ConsumerConnectionPointId\":\"BIDataProvider\",\"TransformerId\":\"f9523e7b-6f15-4073-b629-6b3bb55f5765\"},{\"ProviderId\":\"pps_6d90b72f3e234e969b95313e406a06a2\",\"ProviderParameterName\":\"FilterValues\",\"ConsumerId\":\"pps_075201e3c37b45e58826b34b823f3fde\",\"ProviderConnectionPointId\":\"TransformableBIDataProvider\",\"ConsumerConnectionPointId\":\"BIDataProvider\",\"TransformerId\":\"f3f6bffc-a088-4997-9f5e-72e9d455b3df\"},{\"ProviderId\":\"pps_8a574c7b2be34b9595d0f782a77c4625\",\"ProviderParameterName\":\"FilterValues\",\"ConsumerId\":\"pps_075201e3c37b45e58826b34b823f3fde\",\"ProviderConnectionPointId\":\"TransformableBIDataProvider\",\"ConsumerConnectionPointId\":\"BIDataProvider\",\"TransformerId\":\"096153e0-e4c4-4050-acd9-de244bedd153\"},{\"ProviderId\":\"pps_0a2f09577a224be78d590adfb91145c7\",\"ProviderParameterName\":\"FilterValues\",\"ConsumerId\":\"pps_075201e3c37b45e58826b34b823f3fde\",\"ProviderConnectionPointId\":\"TransformableBIDataProvider\",\"ConsumerConnectionPointId\":\"BIDataProvider\",\"TransformerId\":\"e195148a-b177-455e-91c1-1a7318d1bb14\"}],\"ConsumerRecord\":{\"Id\":\"pps_075201e3c37b45e58826b34b823f3fde\",\"ClientId\":\"pps_075201e3c37b45e58826b34b823f3fde\",\"Configuration\":\"/ar/bi/birealestate/Lists/PerformancePoint Content/46_.000\",\"AssemblyQualifiedName\":\"Microsoft.PerformancePoint.Scorecards.WebControls.ReportViewWebPart, Microsoft.PerformancePoint.Scorecards.WebControls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\",\"ConsumerInputs\":\"[]\",\"ViewState\":{\"FilterSelections\":\"{\\\"list\\\":[{\\\"_consumerParameter\\\":\\\"MonthDay\\\",\\\"_dataValidated\\\":true,\\\"_displayColumnName\\\":\\\"DisplayValue\\\",\\\"_providerValues\\\":[[{\\\"Key\\\":\\\"Key\\\",\\\"Value\\\":\\\"B2BA3F0BD67D04C3D834A383D734ACD3\\\"},{\\\"Key\\\":\\\"ParentKey\\\",\\\"Value\\\":\\\"ACE3EB0D60E3FF755DD24A8D1C094F77\\\"},{\\\"Key\\\":\\\"IsDefault\\\",\\\"Value\\\":false},{\\\"Key\\\":\\\"MemberLevelUniqueName\\\",\\\"Value\\\":\\\"[DimDate].[DateHierarchy6].[YearMonth]\\\"},{\\\"Key\\\":\\\"MemberLevelDepthName\\\",\\\"Value\\\":\\\"1\\\"},{\\\"Key\\\":\\\"MemberDimensionUniqueName\\\",\\\"Value\\\":\\\"[DimDate].[DateHierarchy6]\\\"},{\\\"Key\\\":\\\"IsCalculatedMemberColumn\\\",\\\"Value\\\":\\\"False\\\"},{\\\"Key\\\":\\\"CalculatedMemberExpressionColumn\\\",\\\"Value\\\":null},{\\\"Key\\\":\\\"DisplayValue\\\",\\\"Value\\\":\\\"محرم\\\\/ 1438\\\"},{\\\"Key\\\":\\\"MemberUniqueName\\\",\\\"Value\\\":\\\"[DimDate].[DateHierarchy6].[YearMonth].&[محرم\\\\/ 1438]\\\"}]],\\\"_valuesColumnName\\\":\\\"MemberUniqueName\\\"}]}\"},\"Height\":\"350px\",\"Width\":\"950px\",\"InUseProviderParameterNames\":[],\"ProviderSelections\":{}},\"ParameterRecords\":[{\"ProviderId\":\"pps_f189f23c613647cd8d4b15bc410f7a0b\",\"Name\":\"FilterValues\",\"Selections\":[\"58845C696DB3EE1BC8F488BA7A72A798\"],\"UpdateAction\":2},{\"ProviderId\":\"pps_bc4df99f7ddf4407b566bcb3f37376f4\",\"Name\":\"FilterValues\",\"Selections\":[\"399149E2584D9116BB0328599590011B\"],\"UpdateAction\":2},{\"ProviderId\":\"pps_e9c13243c2764ce7b21a9a5edc1247cd\",\"Name\":\"FilterValues\",\"Selections\":[\"C7601758E7F30570FBE81A35D34ED3FF\"],\"UpdateAction\":2},{\"ProviderId\":\"pps_6d90b72f3e234e969b95313e406a06a2\",\"Name\":\"FilterValues\",\"Selections\":[\"F2430EA4A6B1028B5B642A5E4F7A9E1B\"],\"UpdateAction\":2},{\"ProviderId\":\"pps_8a574c7b2be34b9595d0f782a77c4625\",\"Name\":\"FilterValues\",\"Selections\":[\"7173A29CA0F0687B138480F75DD506AE\"],\"UpdateAction\":2},{\"ProviderId\":\"pps_0a2f09577a224be78d590adfb91145c7\",\"Name\":\"FilterValues\",\"Selections\":[\"24036B5935A8C580D0B1DD2F8288ACC7\"],\"UpdateAction\":2}],\"ProviderRecords\":[{\"Id\":\"pps_f189f23c613647cd8d4b15bc410f7a0b\",\"ClientId\":\"pps_f189f23c613647cd8d4b15bc410f7a0b\",\"Configuration\":\"/ar/bi/birealestate/Lists/PerformancePoint Content/2_.000\",\"AssemblyQualifiedName\":\"Microsoft.PerformancePoint.Scorecards.WebControls.FilterWebPart, Microsoft.PerformancePoint.Scorecards.WebControls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\",\"ConsumerInputs\":\"[]\",\"ViewState\":{\"FilterSelections\":\"{\\\"list\\\":[{\\\"_consumerParameter\\\":\\\"EndPoint_Filter_NonEmpty\\\",\\\"_dataValidated\\\":true,\\\"_displayColumnName\\\":\\\"DisplayValue\\\",\\\"_providerValues\\\":[[{\\\"Key\\\":\\\"Key\\\",\\\"Value\\\":\\\"CB174D0AA2D07A7E66E98E39B7E570BE\\\"},{\\\"Key\\\":\\\"ParentKey\\\",\\\"Value\\\":\\\"E9C9929556D6DE5F15029181256A1BC0\\\"},{\\\"Key\\\":\\\"IsDefault\\\",\\\"Value\\\":true},{\\\"Key\\\":\\\"MemberLevelUniqueName\\\",\\\"Value\\\":\\\"[DimTown].[_RegionName].[_RegionName]\\\"},{\\\"Key\\\":\\\"MemberLevelDepthName\\\",\\\"Value\\\":\\\"1\\\"},{\\\"Key\\\":\\\"MemberDimensionUniqueName\\\",\\\"Value\\\":\\\"[DimTown].[_RegionName]\\\"},{\\\"Key\\\":\\\"IsCalculatedMemberColumn\\\",\\\"Value\\\":\\\"False\\\"},{\\\"Key\\\":\\\"CalculatedMemberExpressionColumn\\\",\\\"Value\\\":null},{\\\"Key\\\":\\\"DisplayValue\\\",\\\"Value\\\":\\\"منطقة الرياض\\\"},{\\\"Key\\\":\\\"MemberUniqueName\\\",\\\"Value\\\":\\\"[DimTown].[_RegionName].&[منطقة الرياض]\\\"}]],\\\"_valuesColumnName\\\":\\\"MemberUniqueName\\\"}]}\"}},{\"Id\":\"pps_bc4df99f7ddf4407b566bcb3f37376f4\",\"ClientId\":\"pps_bc4df99f7ddf4407b566bcb3f37376f4\",\"Configuration\":\"/ar/bi/birealestate/Lists/PerformancePoint Content/13_.000\",\"AssemblyQualifiedName\":\"Microsoft.PerformancePoint.Scorecards.WebControls.FilterWebPart, Microsoft.PerformancePoint.Scorecards.WebControls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\",\"ConsumerInputs\":\"[]\",\"ViewState\":{\"FilterSelections\":\"{\\\"list\\\":[{\\\"_consumerParameter\\\":\\\"EndPoint_Filter_NonEmpty\\\",\\\"_dataValidated\\\":true,\\\"_displayColumnName\\\":\\\"DisplayValue\\\",\\\"_providerValues\\\":[[{\\\"Key\\\":\\\"Key\\\",\\\"Value\\\":\\\"58845C696DB3EE1BC8F488BA7A72A798\\\"},{\\\"Key\\\":\\\"ParentKey\\\",\\\"Value\\\":\\\"678F72C7323A5F9416AAB06415189F6E\\\"},{\\\"Key\\\":\\\"IsDefault\\\",\\\"Value\\\":false},{\\\"Key\\\":\\\"MemberLevelUniqueName\\\",\\\"Value\\\":\\\"[DimTown].[_TownName].[_TownName]\\\"},{\\\"Key\\\":\\\"MemberLevelDepthName\\\",\\\"Value\\\":\\\"1\\\"},{\\\"Key\\\":\\\"MemberDimensionUniqueName\\\",\\\"Value\\\":\\\"[DimTown].[_TownName]\\\"},{\\\"Key\\\":\\\"IsCalculatedMemberColumn\\\",\\\"Value\\\":\\\"False\\\"},{\\\"Key\\\":\\\"CalculatedMemberExpressionColumn\\\",\\\"Value\\\":null},{\\\"Key\\\":\\\"DisplayValue\\\",\\\"Value\\\":\\\"الرياض\\\"},{\\\"Key\\\":\\\"MemberUniqueName\\\",\\\"Value\\\":\\\"[DimTown].[_TownName].&[الرياض]\\\"}]],\\\"_valuesColumnName\\\":\\\"MemberUniqueName\\\"}]}\"}},{\"Id\":\"pps_e9c13243c2764ce7b21a9a5edc1247cd\",\"ClientId\":\"pps_e9c13243c2764ce7b21a9a5edc1247cd\",\"Configuration\":\"/ar/bi/birealestate/Lists/PerformancePoint Content/3_.000\",\"AssemblyQualifiedName\":\"Microsoft.PerformancePoint.Scorecards.WebControls.FilterWebPart, Microsoft.PerformancePoint.Scorecards.WebControls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\",\"ConsumerInputs\":\"[]\",\"ViewState\":{}},{\"Id\":\"pps_6d90b72f3e234e969b95313e406a06a2\",\"ClientId\":\"pps_6d90b72f3e234e969b95313e406a06a2\",\"Configuration\":\"/ar/bi/birealestate/Lists/PerformancePoint Content/12_.000\",\"AssemblyQualifiedName\":\"Microsoft.PerformancePoint.Scorecards.WebControls.FilterWebPart, Microsoft.PerformancePoint.Scorecards.WebControls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\",\"ConsumerInputs\":\"[]\",\"ViewState\":{}},{\"Id\":\"pps_8a574c7b2be34b9595d0f782a77c4625\",\"ClientId\":\"pps_8a574c7b2be34b9595d0f782a77c4625\",\"Configuration\":\"/ar/bi/birealestate/Lists/PerformancePoint Content/5_.000\",\"AssemblyQualifiedName\":\"Microsoft.PerformancePoint.Scorecards.WebControls.FilterWebPart, Microsoft.PerformancePoint.Scorecards.WebControls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\",\"ConsumerInputs\":\"[]\",\"ViewState\":{}},{\"Id\":\"pps_0a2f09577a224be78d590adfb91145c7\",\"ClientId\":\"pps_0a2f09577a224be78d590adfb91145c7\",\"Configuration\":\"/ar/bi/birealestate/Lists/PerformancePoint Content/561_.000\",\"AssemblyQualifiedName\":\"Microsoft.PerformancePoint.Scorecards.WebControls.FilterWebPart, Microsoft.PerformancePoint.Scorecards.WebControls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\",\"ConsumerInputs\":\"[]\",\"ViewState\":{\"FilterSelections\":\"{\\\"list\\\":[{\\\"_consumerParameter\\\":\\\"EndPoint_Filter_NonEmpty\\\",\\\"_dataValidated\\\":true,\\\"_displayColumnName\\\":\\\"DisplayValue\\\",\\\"_providerValues\\\":[[{\\\"Key\\\":\\\"Key\\\",\\\"Value\\\":\\\"7173A29CA0F0687B138480F75DD506AE\\\"},{\\\"Key\\\":\\\"ParentKey\\\",\\\"Value\\\":\\\"BBE7D1F47156389FD96AA71602BDC027\\\"},{\\\"Key\\\":\\\"IsDefault\\\",\\\"Value\\\":true},{\\\"Key\\\":\\\"MemberLevelUniqueName\\\",\\\"Value\\\":\\\"[DimDate].[_DateYear].[_DateYear]\\\"},{\\\"Key\\\":\\\"MemberLevelDepthName\\\",\\\"Value\\\":\\\"1\\\"},{\\\"Key\\\":\\\"MemberDimensionUniqueName\\\",\\\"Value\\\":\\\"[DimDate].[_DateYear]\\\"},{\\\"Key\\\":\\\"IsCalculatedMemberColumn\\\",\\\"Value\\\":\\\"False\\\"},{\\\"Key\\\":\\\"CalculatedMemberExpressionColumn\\\",\\\"Value\\\":null},{\\\"Key\\\":\\\"DisplayValue\\\",\\\"Value\\\":\\\"1438\\\"},{\\\"Key\\\":\\\"MemberUniqueName\\\",\\\"Value\\\":\\\"[DimDate].[_DateYear].&[1438]\\\"}]],\\\"_valuesColumnName\\\":\\\"MemberUniqueName\\\"}]}\"}}],\"TransformerRecords\":[{\"Id\":\"959c2a24-b9bb-4c2b-a91a-9e2abcc0bd61\",\"Configuration\":\"{\\\"ProviderConsumerTransformations\\\":{\\\"Records\\\":[{\\\"MappingId\\\":\\\"5cb047d2-d61f-4f0f-9e5f-dcfba1ddb917\\\",\\\"ConsumerParameterName\\\":\\\"Town\\\",\\\"ProviderParameterDisplayName\\\":\\\"اختر المدينة\\\",\\\"ProviderParameterName\\\":\\\"FilterValues\\\",\\\"TypeFullName\\\":\\\"System.String\\\",\\\"ProviderFormula\\\":null,\\\"ValuesColumnName\\\":\\\"MemberUniqueName\\\",\\\"DisplayColumnName\\\":\\\"DisplayValue\\\",\\\"EncodeAsSet\\\":false}]},\\\"ConditionalVisibilityRecord\\\":{\\\"IsDefined\\\":false,\\\"ProviderParameterDisplayName\\\":null,\\\"ProviderParameterName\\\":null,\\\"VisibilitySelections\\\":[],\\\"IsDefaultVisibility\\\":false}}\",\"AssemblyQualifiedName\":\"Microsoft.PerformancePoint.Scorecards.WebControls.TransformableBIDataProviderTransformer, Microsoft.PerformancePoint.Scorecards.WebControls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\"},{\"Id\":\"f53b6688-9102-40d8-8cb5-d77432c3779d\",\"Configuration\":\"{\\\"ProviderConsumerTransformations\\\":{\\\"Records\\\":[{\\\"MappingId\\\":\\\"a3f48b15-5ad4-4e6b-a84c-e7daf0ddeff0\\\",\\\"ConsumerParameterName\\\":\\\"District\\\",\\\"ProviderParameterDisplayName\\\":\\\"اختر الأحياء\\\",\\\"ProviderParameterName\\\":\\\"FilterValues\\\",\\\"TypeFullName\\\":\\\"System.String\\\",\\\"ProviderFormula\\\":null,\\\"ValuesColumnName\\\":\\\"MemberUniqueName\\\",\\\"DisplayColumnName\\\":\\\"DisplayValue\\\",\\\"EncodeAsSet\\\":false}]},\\\"ConditionalVisibilityRecord\\\":{\\\"IsDefined\\\":false,\\\"ProviderParameterDisplayName\\\":null,\\\"ProviderParameterName\\\":null,\\\"VisibilitySelections\\\":[],\\\"IsDefaultVisibility\\\":false}}\",\"AssemblyQualifiedName\":\"Microsoft.PerformancePoint.Scorecards.WebControls.TransformableBIDataProviderTransformer, Microsoft.PerformancePoint.Scorecards.WebControls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\"},{\"Id\":\"f9523e7b-6f15-4073-b629-6b3bb55f5765\",\"Configuration\":\"{\\\"ProviderConsumerTransformations\\\":{\\\"Records\\\":[{\\\"MappingId\\\":\\\"1af1402b-c969-4fea-9813-6a1b28768ea0\\\",\\\"ConsumerParameterName\\\":\\\"Class\\\",\\\"ProviderParameterDisplayName\\\":\\\"اختر تصنيف العقار\\\",\\\"ProviderParameterName\\\":\\\"FilterValues\\\",\\\"TypeFullName\\\":\\\"System.String\\\",\\\"ProviderFormula\\\":null,\\\"ValuesColumnName\\\":\\\"MemberUniqueName\\\",\\\"DisplayColumnName\\\":\\\"DisplayValue\\\",\\\"EncodeAsSet\\\":false}]},\\\"ConditionalVisibilityRecord\\\":{\\\"IsDefined\\\":false,\\\"ProviderParameterDisplayName\\\":null,\\\"ProviderParameterName\\\":null,\\\"VisibilitySelections\\\":[],\\\"IsDefaultVisibility\\\":false}}\",\"AssemblyQualifiedName\":\"Microsoft.PerformancePoint.Scorecards.WebControls.TransformableBIDataProviderTransformer, Microsoft.PerformancePoint.Scorecards.WebControls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\"},{\"Id\":\"f3f6bffc-a088-4997-9f5e-72e9d455b3df\",\"Configuration\":\"{\\\"ProviderConsumerTransformations\\\":{\\\"Records\\\":[{\\\"MappingId\\\":\\\"f2ba1b98-6655-4022-bfa8-bc80565d64b5\\\",\\\"ConsumerParameterName\\\":\\\"Type\\\",\\\"ProviderParameterDisplayName\\\":\\\"اختر نوع العقار\\\",\\\"ProviderParameterName\\\":\\\"FilterValues\\\",\\\"TypeFullName\\\":\\\"System.String\\\",\\\"ProviderFormula\\\":null,\\\"ValuesColumnName\\\":\\\"MemberUniqueName\\\",\\\"DisplayColumnName\\\":\\\"DisplayValue\\\",\\\"EncodeAsSet\\\":false}]},\\\"ConditionalVisibilityRecord\\\":{\\\"IsDefined\\\":false,\\\"ProviderParameterDisplayName\\\":null,\\\"ProviderParameterName\\\":null,\\\"VisibilitySelections\\\":[],\\\"IsDefaultVisibility\\\":false}}\",\"AssemblyQualifiedName\":\"Microsoft.PerformancePoint.Scorecards.WebControls.TransformableBIDataProviderTransformer, Microsoft.PerformancePoint.Scorecards.WebControls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\"},{\"Id\":\"096153e0-e4c4-4050-acd9-de244bedd153\",\"Configuration\":\"{\\\"ProviderConsumerTransformations\\\":{\\\"Records\\\":[{\\\"MappingId\\\":\\\"7cbf9ccf-beea-4558-9131-06937398c6d7\\\",\\\"ConsumerParameterName\\\":\\\"Year\\\",\\\"ProviderParameterDisplayName\\\":\\\"اختر السنة\\\",\\\"ProviderParameterName\\\":\\\"FilterValues\\\",\\\"TypeFullName\\\":\\\"System.String\\\",\\\"ProviderFormula\\\":null,\\\"ValuesColumnName\\\":\\\"MemberUniqueName\\\",\\\"DisplayColumnName\\\":\\\"DisplayValue\\\",\\\"EncodeAsSet\\\":false}]},\\\"ConditionalVisibilityRecord\\\":{\\\"IsDefined\\\":false,\\\"ProviderParameterDisplayName\\\":null,\\\"ProviderParameterName\\\":null,\\\"VisibilitySelections\\\":[],\\\"IsDefaultVisibility\\\":false}}\",\"AssemblyQualifiedName\":\"Microsoft.PerformancePoint.Scorecards.WebControls.TransformableBIDataProviderTransformer, Microsoft.PerformancePoint.Scorecards.WebControls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\"},{\"Id\":\"e195148a-b177-455e-91c1-1a7318d1bb14\",\"Configuration\":\"{\\\"ProviderConsumerTransformations\\\":{\\\"Records\\\":[{\\\"MappingId\\\":\\\"a7d1b8eb-9c7a-42f5-83be-fce0e38d48a4\\\",\\\"ConsumerParameterName\\\":\\\"MonthDay\\\",\\\"ProviderParameterDisplayName\\\":\\\"اختر الشهر او اليوم\\\",\\\"ProviderParameterName\\\":\\\"FilterValues\\\",\\\"TypeFullName\\\":\\\"System.String\\\",\\\"ProviderFormula\\\":null,\\\"ValuesColumnName\\\":\\\"MemberUniqueName\\\",\\\"DisplayColumnName\\\":\\\"DisplayValue\\\",\\\"EncodeAsSet\\\":false}]},\\\"ConditionalVisibilityRecord\\\":{\\\"IsDefined\\\":false,\\\"ProviderParameterDisplayName\\\":null,\\\"ProviderParameterName\\\":null,\\\"VisibilitySelections\\\":[],\\\"IsDefaultVisibility\\\":false}}\",\"AssemblyQualifiedName\":\"Microsoft.PerformancePoint.Scorecards.WebControls.TransformableBIDataProviderTransformer, Microsoft.PerformancePoint.Scorecards.WebControls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\"}]}}"

headers = {
'content-type': "application/json",
'cache-control': "no-cache"
}

conn.request("POST", "/ar/OpenData/bi/birealestate/_vti_bin/PPS/PPSRenderingService.json/RenderWebPartContent", payload.encode('utf-8'), headers)
res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

我的问题是如何从上面的打印数据中获取特定的html项目, 特别是表

非常感谢您的帮助。

0 个答案:

没有答案