您看到的数据从外部URL加载.要加载它,您可以使用以下示例:
import requests
from bs4 import BeautifulSoup
url = "https://www.mathworks.com/help/radar/referencelist_block_cat.xml"
soup = BeautifulSoup(requests.get(url).content, "xml")
for category in soup.select("cat:has(ref)"):
print(category.title.text)
print()
for r in category.select("ref"):
print(
f'{r.text[:40]:<40} {"https://www.mathworks.com/help/radar/" + r["target"]}'
)
print()
输出:
Radar Toolbox
Backscatter signals from bicyclist (Sinc https://www.mathworks.com/help/radar/ref/backscatterbicyclistblock.html
Backscatter signals from pedestrian (Sin https://www.mathworks.com/help/radar/ref/backscatterpedestrianblock.html
Barrage jammer interference source (Sinc https://www.mathworks.com/help/radar/ref/barragejammer.html
Constant gamma clutter simulation (Since https://www.mathworks.com/help/radar/ref/constantgammaclutter.html
Constant gamma clutter simulation using https://www.mathworks.com/help/radar/ref/gpuconstantgammaclutter.html
Generate radar sensor detections and tra https://www.mathworks.com/help/radar/ref/radardatagenerator.html
Combine detection reports from different https://www.mathworks.com/help/radar/ref/detectionconcatenation.html
Two-ray channel environment (Since R2021 https://www.mathworks.com/help/radar/ref/tworaychannel.html
Wideband two-ray channel environment (Si https://www.mathworks.com/help/radar/ref/widebandtworaychannel.html
Library of pulse waveforms (Since R2021a https://www.mathworks.com/help/radar/ref/pulsewaveformlibrary.html
Library of pulse compression specificati https://www.mathworks.com/help/radar/ref/pulsecompressionlibrary.html
Cluster detections (Since R2021a) https://www.mathworks.com/help/radar/ref/dbscanclusterer.html
Data Synthesis
Backscatter signals from bicyclist (Sinc https://www.mathworks.com/help/radar/ref/backscatterbicyclistblock.html
Backscatter signals from pedestrian (Sin https://www.mathworks.com/help/radar/ref/backscatterpedestrianblock.html
Barrage jammer interference source (Sinc https://www.mathworks.com/help/radar/ref/barragejammer.html
Constant gamma clutter simulation (Since https://www.mathworks.com/help/radar/ref/constantgammaclutter.html
Constant gamma clutter simulation using https://www.mathworks.com/help/radar/ref/gpuconstantgammaclutter.html
Generate radar sensor detections and tra https://www.mathworks.com/help/radar/ref/radardatagenerator.html
Combine detection reports from different https://www.mathworks.com/help/radar/ref/detectionconcatenation.html
Two-ray channel environment (Since R2021 https://www.mathworks.com/help/radar/ref/tworaychannel.html
Wideband two-ray channel environment (Si https://www.mathworks.com/help/radar/ref/widebandtworaychannel.html
Library of pulse waveforms (Since R2021a https://www.mathworks.com/help/radar/ref/pulsewaveformlibrary.html
Signal and Data Processing
Library of pulse compression specificati https://www.mathworks.com/help/radar/ref/pulsecompressionlibrary.html
Cluster detections (Since R2021a) https://www.mathworks.com/help/radar/ref/dbscanclusterer.html
Detection, Range, Angle, and Doppler Estimation
Library of pulse compression specificati https://www.mathworks.com/help/radar/ref/pulsecompressionlibrary.html
Clustering
Cluster detections (Since R2021a) https://www.mathworks.com/help/radar/ref/dbscanclusterer.html