fork download
  1. data = '''{
  2. "props": {
  3. "pageProps": {
  4. "property": {
  5. "uprn": "61019296",
  6. "address": {
  7. "uprn": "61019296",
  8. "fullAddress": "8 Arthur Street Barnoldswick BB18 5JZ",
  9. "postcode": "BB18 5JZ",
  10. "country": "England",
  11. "outcode": "BB18",
  12. "latitude": 53.9229587,
  13. "longitude": -2.1940256
  14. },
  15. "attributes": {
  16. "bathrooms": null,
  17. "bedrooms": 3,
  18. "floorAreaSqM": 109,
  19. "livingRooms": null,
  20. "tenure": "Freehold",
  21. "propertyType": "Mid Terrace House",
  22. "userSubmitted": null
  23. },
  24. "energy": {
  25. "currentEnergyRating": "C"
  26. },
  27. "rentEstimate": {
  28. "lowerPrice": 700,
  29. "currentPrice": 750,
  30. "upperPrice": 800
  31. },
  32. "saleEstimate": {
  33. "lowerPrice": 128000,
  34. "currentPrice": 135000,
  35. "upperPrice": 141000,
  36. "confidenceLevel": "HIGH",
  37. "valueChange": {
  38. "numericChange": -16000,
  39. "percentageChange": -10.596026490066226,
  40. "saleDate": "2024-12-20"
  41. },
  42. "ingestedAt": "2025-02-06T14:05:28.374Z"
  43. },
  44. "history": {
  45. "historicListings": [],
  46. "historicSales": [
  47. {
  48. "date": "2024-12-20",
  49. "price": 151000,
  50. "percentageChange": 41.1214953271028,
  51. "numericChange": 44000
  52. },
  53. {
  54. "date": "2024-01-10",
  55. "price": 107000,
  56. "percentageChange": 3.3816425120772946,
  57. "numericChange": 3500
  58. },
  59. {
  60. "date": "2007-01-19",
  61. "price": 103500,
  62. "percentageChange": 168.8311688311688,
  63. "numericChange": 65000
  64. },
  65. {
  66. "date": "2001-05-25",
  67. "price": 38500,
  68. "percentageChange": null,
  69. "numericChange": null
  70. }
  71. ],
  72. "soldPricesDataSource": "landRegistry"
  73. },
  74. "staticMapImage": {
  75. "devices": {
  76. "mobile": 0,
  77. "mobile2x": 1,
  78. "medium": 2,
  79. "large": 3
  80. },
  81. "urls": [
  82. {
  83. "height": 200,
  84. "width": 400,
  85. "src": "https://m...content-available-to-author-only...o.uk/styles/portal/static/-2.194025653.922958716/400x200.webp?marker=-2.1940256%2C53.9229587%7Chome-property-pin%402x.png%7Cscale%3A0.5"
  86. },
  87. {
  88. "height": 200,
  89. "width": 400,
  90. "src": "https://m...content-available-to-author-only...o.uk/styles/portal/static/-2.194025653.922958716/400x200@2x.webp?marker=-2.1940256%2C53.9229587%7Chome-property-pin%402x.png%7Cscale%3A0.5"
  91. },
  92. {
  93. "height": 170,
  94. "width": 1024,
  95. "src": "https://m...content-available-to-author-only...o.uk/styles/portal/static/-2.194025653.922958716/1024x170.webp?marker=-2.1940256%2C53.9229587%7Chome-property-pin%402x.png%7Cscale%3A0.5"
  96. },
  97. {
  98. "height": 170,
  99. "width": 1024,
  100. "src": "https://m...content-available-to-author-only...o.uk/styles/portal/static/-2.194025653.922958716/1024x170@2x.webp?marker=-2.1940256%2C53.9229587%7Chome-property-pin%402x.png%7Cscale%3A0.5"
  101. }
  102. ]
  103. }
  104. }
  105. },
  106. "__N_SSP": true,
  107. "page": "/property/uprn/[uprn]",
  108. "query": {
  109. "uprn": "61019296"
  110. },
  111. "buildId": "qkeVHjsjKJkHtFt7X0D5w",
  112. "assetPrefix": "https://c...content-available-to-author-only...o.uk",
  113. "isFallback": false,
  114. "dynamicIds": [
  115. 6573899826
  116. ],
  117. "gssp": true,
  118. "customServer": true,
  119. "scriptLoader": []
  120. }
  121. }
  122. '''
  123.  
  124. import json
  125. data = json.loads(data)
  126.  
  127. latitude = data["props"]["pageProps"]["property"]["address"]["latitude"]
  128.  
  129. print(latitude)
Success #stdin #stdout 0.16s 15592KB
stdin
Standard input is empty
stdout
53.9229587