HtmlGeoExtractorTest

21

tests

0

failures

0

ignored

0.026s

duration

100%

successful

Tests

Test Duration Result
JSON-LD takes priority over data attributes when both present() 0.012s passed
accepts Corsica coordinates() 0.001s passed
accepts DOM coordinates (Martinique)() 0.001s passed
accepts DOM coordinates (Reunion)() 0s passed
extracts from JSON latitude longitude fields in embedded script() 0s passed
extracts from JSON-LD array of types() 0s passed
extracts from JSON-LD nested in RealEstateListing() 0.001s passed
extracts from JSON-LD schema Place geo object() 0.001s passed
extracts from Leaflet data-lat data-lng attributes() 0.001s passed
extracts from Leaflet marker call() 0.001s passed
extracts from data-latitude data-longitude attributes() 0s passed
extracts from google maps LatLng constructor() 0.001s passed
extracts from og latitude longitude() 0.001s passed
extracts from place location meta tags() 0s passed
extracts from typical Preux-style anonymized listing fixture() 0s passed
ignores malformed JSON-LD() 0.004s passed
rejects coordinates outside France bounds() 0.001s passed
rejects zero zero coordinates() 0.001s passed
returns null for blank html() 0s passed
returns null for null html() 0s passed
returns null when no geo signal present() 0s passed

Standard output

05:52:04.826 [Test worker] WARN com.alertimmo.aiscraping.extraction.HtmlGeoExtractor -- [HtmlGeoExtractor] JSON-LD block present (16 chars) but unparseable: Unexpected character ('i' (code 105)): was expecting double-quote to start field name
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 3]