Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何查找url的xpath_Xpath - Fatal编程技术网

如何查找url的xpath

如何查找url的xpath,xpath,Xpath,您能帮我获取以下URL的xpath吗 正如您在本页上看到的,本月、下个月和今年有三个选项卡。在所有三个选项卡中都有三个价格。我需要所有九个价格的xpath和这九个价格的html链接 我已经试过了 //div[@class='FlightCard_FlightCard__priceContent__K59VJ']/div[@class='FlightCard_FlightCard__priceButton__BSPoZ']/div[@class='FlightCard_FlightCard__f

您能帮我获取以下URL的xpath吗

正如您在本页上看到的,本月、下个月和今年有三个选项卡。在所有三个选项卡中都有三个价格。我需要所有九个价格的xpath和这九个价格的html链接

我已经试过了

//div[@class='FlightCard_FlightCard__priceContent__K59VJ']/div[@class='FlightCard_FlightCard__priceButton__BSPoZ']/div[@class='FlightCard_FlightCard__fromPrice__3M32b']/span[@class='BpkText_bpk-text__1H2sR BpkText_bpk-text--lg__1HjEY FlightCard_FlightCard__price__6ZsOs'] 
从这个月的账单上给我126美元,131美元和132美元。我找不到下个月和今年的三种价格


谢谢

您可以使用下面的xpath获取包含url和价格的json

//section[@class='main-section flight-highlights']/div[@class='main']/script[1]
使用首选语言和库解析json以获得所需的输出

屏幕截图:

请告诉我们您试过什么?//div[@class='FlightCard\u FlightCard\uuuuu price content\uu K59VJ']/div[@class='FlightCard\uu FlightCard\uuu price button\uu BSPoZ']/div[@class='FlightCard\u FlightCard\uu from price\uuu 3M32b']/span[@class='BpkText\u bpk-text\u1h2uktext\uu bpk-text\uk-text--lg\u1hjey FlightCard\uzsu\uz]给我126美元,“本月”选项卡中的131美元和132美元。我无法从下个月和今年的选项卡中找到三个价格。考虑在适当的格式中添加这个问题:完成了。谢谢阿米特·亚达夫。我是新来的,所以我没有意识到这一点。很抱歉。当您单击这些选项卡时,数据正在加载。但是,数据已经存在于html中的
script
下。您可以获取页面源代码并解析值。