我正在尝试从“https://realtruck.com/p/rugged-ridge-floor-mats/”获取数据 但问题是他们改变了布局。 现在我试着得到下拉列表
问题:列表很灵活,一次可能有5个列表,10个我们不知道的列表。 所以我想要根据下拉列表灵活的for循环
这是我以前的代码: 这是静态代码,我希望它是动态的
for year in years:
yield ...
make_arr
for make in make_arr:
yield ...
models_arr
for model in models_arr:
yield ...
body_arr
for body in body_arr:
yield ...
colors_arr
for color in colors_arr:
yield ...
这些列表是动态的(年份除外),它们的数据是使用XHR调用填充的
post有效负载包括用户以前的选择。示例
因此,您需要多年来循环并开始调用XHR调用。在这个循环中,您需要为每个子类别嵌套更多的循环
比如:
相关问题 更多 >
编程相关推荐