I would like to get the value of uuid key in the below text. Can I achieve this with XPATH?
I am scraping this value from a website source code.
jQuery(document).ready(function ($) {
var infoTemplate = Handlebars.compile($('#vehicle-person-template').html());
var summaryTemplate = Handlebars.compile($('#vehicle-summary-template').html());
axios.post("https:\/\/www.merinfo.se\/ajax\/vehicles", {
uuid: "21ac0674-488a-11e8-9b40-47e7b0ba95bc" })
.then(function (response) {
$('#vehicle-info').html(infoTemplate(response.data.data));
$('#vehicle-summary').html(summaryTemplate(response.data.data));
})
.catch(function (error) {
$("#vehicle-info").html('<p class="font-italic mb-0">Fordonsinformation ej tillgängligt för tillfället</p>');
$('#vehicle-summary').html('<p class="font-italic mb-0">Fordonsinformation ej tillgängligt för tillfället</p>');
});
});
jQuery(document).ready(function ($) {
var source = $("#person-residence-template").html();
var template = Handlebars.compile(source);
axios.post("https:\/\/www.merinfo.se\/api\/v1\/person\/residence", {
uuid: "21ac0674-488a-11e8-9b40-47e7b0ba95bc" })
.then(function (response) {
if (typeof response.data.data !== 'undefined') {
$('#residence-info').html(template(response.data.data));
} else {
$("#residence-info").html('<p class="font-italic mb-0">Vi saknar bostadsinformation för Björn</p>');
}
})
.catch(function (error) {
$("#residence-info").html('<p class="font-italic mb-0">Vi saknar bostadsinformation för Björn</p>');
});
});