我只想获取两个值之间的值。
我的文档:
{"homepage":"https:\/\/m.propertyfinder.ae\/property\/59d943f6432c7ef7d5aa39442d6354be\/338\/248\/MODE\/b75dd8\/7288794-aa684o.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/59d943f6432c7ef7d5aa39442d6354be\/668\/452\/MODE\/bb82f2\/7288794-aa684o.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/59d943f6432c7ef7d5aa39442d6354be\/260\/185\/MODE\/9efa0c\/7288794-aa684o.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/59d943f6432c7ef7d5aa39442d6354be\/668\/452\/MODE\/bb82f2\/7288794-aa684o.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/59d943f6432c7ef7d5aa39442d6354be\/95\/95\/MODE\/6cc9cf\/7288794-aa684o.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/59d943f6432c7ef7d5aa39442d6354be\/856\/550\/MODE\/8e9e8d\/7288794-aa684o.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/59d943f6432c7ef7d5aa39442d6354be\/416\/272\/MODE\/b08891\/7288794-aa684o.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/59d943f6432c7ef7d5aa39442d6354be\/1312\/894\/MODE\/1ed037\/7288794-aa684o.jpg"}},{"type":"property_image","id":"114347436","attributes":{"id":"114347436","path":"7288794-5c226o.jpg","number":2,"version":"843b2a19a0df1161d297bcf3fff65efd","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/843b2a19a0df1161d297bcf3fff65efd\/338\/248\/MODE\/ad30c5\/7288794-5c226o.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/843b2a19a0df1161d297bcf3fff65efd\/668\/452\/MODE\/457bd4\/7288794-5c226o.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/843b2a19a0df1161d297bcf3fff65efd\/260\/185\/MODE\/891c52\/7288794-5c226o.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/843b2a19a0df1161d297bcf3fff65efd\/668\/452\/MODE\/457bd4\/7288794-5c226o.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/843b2a19a0df1161d297bcf3fff65efd\/95\/95\/MODE\/2ac280\/7288794-5c226o.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/843b2a19a0df1161d297bcf3fff65efd\/856\/550\/MODE\/5dfb7f\/7288794-5c226o.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/843b2a19a0df1161d297bcf3fff65efd\/416\/272\/MODE\/e1f589\/7288794-5c226o.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/843b2a19a0df1161d297bcf3fff65efd\/1312\/894\/MODE\/f07fd1\/7288794-5c226o.jpg"}},{"type":"property_image","id":"114347437","attributes":{"id":"114347437","path":"7288794-6f06co.jpg","number":3,"version":"8d2bd5eef5a17c37a48d31d0b22c389d","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/8d2bd5eef5a17c37a48d31d0b22c389d\/338\/248\/MODE\/a73a93\/7288794-6f06co.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/8d2bd5eef5a17c37a48d31d0b22c389d\/668\/452\/MODE\/3bea7a\/7288794-6f06co.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/8d2bd5eef5a17c37a48d31d0b22c389d\/260\/185\/MODE\/be7ea0\/7288794-6f06co.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/8d2bd5eef5a17c37a48d31d0b22c389d\/668\/452\/MODE\/3bea7a\/7288794-6f06co.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/8d2bd5eef5a17c37a48d31d0b22c389d\/95\/95\/MODE\/066e8d\/7288794-6f06co.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/8d2bd5eef5a17c37a48d31d0b22c389d\/856\/550\/MODE\/f59674\/7288794-6f06co.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/8d2bd5eef5a17c37a48d31d0b22c389d\/416\/272\/MODE\/75c221\/7288794-6f06co.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/8d2bd5eef5a17c37a48d31d0b22c389d\/1312\/894\/MODE\/aa3e29\/7288794-6f06co.jpg"}},{"type":"property_image","id":"114347441","attributes":{"id":"114347441","path":"7288794-b803do.jpg","number":4,"version":"91408e478f73e82a192b6fa68b58c72e","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/91408e478f73e82a192b6fa68b58c72e\/338\/248\/MODE\/446469\/7288794-b803do.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/91408e478f73e82a192b6fa68b58c72e\/668\/452\/MODE\/294484\/7288794-b803do.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/91408e478f73e82a192b6fa68b58c72e\/260\/185\/MODE\/489dff\/7288794-b803do.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/91408e478f73e82a192b6fa68b58c72e\/668\/452\/MODE\/294484\/7288794-b803do.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/91408e478f73e82a192b6fa68b58c72e\/95\/95\/MODE\/d566b5\/7288794-b803do.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/91408e478f73e82a192b6fa68b58c72e\/856\/550\/MODE\/6d37e0\/7288794-b803do.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/91408e478f73e82a192b6fa68b58c72e\/416\/272\/MODE\/c19ca4\/7288794-b803do.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/91408e478f73e82a192b6fa68b58c72e\/1312\/894\/MODE\/d040c4\/7288794-b803do.jpg"}},{"type":"property_image","id":"114347443","attributes":{"id":"114347443","path":"7288794-e3ac2o.jpg","number":5,"version":"244dbfd60cad07b4326854a984912829","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/244dbfd60cad07b4326854a984912829\/338\/248\/MODE\/799a71\/7288794-e3ac2o.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/244dbfd60cad07b4326854a984912829\/668\/452\/MODE\/5ac590\/7288794-e3ac2o.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/244dbfd60cad07b4326854a984912829\/260\/185\/MODE\/3e8aed\/7288794-e3ac2o.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/244dbfd60cad07b4326854a984912829\/668\/452\/MODE\/5ac590\/7288794-e3ac2o.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/244dbfd60cad07b4326854a984912829\/95\/95\/MODE\/8affd8\/7288794-e3ac2o.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/244dbfd60cad07b4326854a984912829\/856\/550\/MODE\/098546\/7288794-e3ac2o.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/244dbfd60cad07b4326854a984912829\/416\/272\/MODE\/c6f2d7\/7288794-e3ac2o.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/244dbfd60cad07b4326854a984912829\/1312\/894\/MODE\/b3b697\/7288794-e3ac2o.jpg"}},{"type":"property_image","id":"114347447","attributes":{"id":"114347447","path":"7288794-d02f9o.jpg","number":6,"version":"54385a73a9486c3e00a395d29484e667","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/54385a73a9486c3e00a395d29484e667\/338\/248\/MODE\/b65174\/7288794-d02f9o.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/54385a73a9486c3e00a395d29484e667\/668\/452\/MODE\/60694d\/7288794-d02f9o.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/54385a73a9486c3e00a395d29484e667\/260\/185\/MODE\/58accb\/7288794-d02f9o.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/54385a73a9486c3e00a395d29484e667\/668\/452\/MODE\/60694d\/7288794-d02f9o.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/54385a73a9486c3e00a395d29484e667\/95\/95\/MODE\/8a1237\/7288794-d02f9o.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/54385a73a9486c3e00a395d29484e667\/856\/550\/MODE\/c9d028\/7288794-d02f9o.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/54385a73a9486c3e00a395d29484e667\/416\/272\/MODE\/949c8d\/7288794-d02f9o.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/54385a73a9486c3e00a395d29484e667\/1312\/894\/MODE\/b7f708\/7288794-d02f9o.jpg"}},{"type":"property_image","id":"114347449","attributes":{"id":"114347449","path":"7288794-13c7do.jpg","number":7,"version":"d83c3b010f72c8273a0dd2f8308cc754","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/d83c3b010f72c8273a0dd2f8308cc754\/338\/248\/MODE\/1c8a51\/7288794-13c7do.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/d83c3b010f72c8273a0dd2f8308cc754\/668\/452\/MODE\/708e40\/7288794-13c7do.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/d83c3b010f72c8273a0dd2f8308cc754\/260\/185\/MODE\/93e894\/7288794-13c7do.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/d83c3b010f72c8273a0dd2f8308cc754\/668\/452\/MODE\/708e40\/7288794-13c7do.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/d83c3b010f72c8273a0dd2f8308cc754\/95\/95\/MODE\/47e4a6\/7288794-13c7do.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/d83c3b010f72c8273a0dd2f8308cc754\/856\/550\/MODE\/ad2d3a\/7288794-13c7do.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/d83c3b010f72c8273a0dd2f8308cc754\/416\/272\/MODE\/5b4131\/7288794-13c7do.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/d83c3b010f72c8273a0dd2f8308cc754\/1312\/894\/MODE\/7f6fac\/7288794-13c7do.jpg"}},{"type":"property_image","id":"114347453","attributes":{"id":"114347453","path":"7288794-3c1f2o.jpg","number":8,"version":"9c9bb2b8fa12b33755f1366a53db73ca","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/9c9bb2b8fa12b33755f1366a53db73ca\/338\/248\/MODE\/1c46c7\/7288794-3c1f2o.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/9c9bb2b8fa12b33755f1366a53db73ca\/668\/452\/MODE\/e246b9\/7288794-3c1f2o.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/9c9bb2b8fa12b33755f1366a53db73ca\/260\/185\/MODE\/2b818a\/7288794-3c1f2o.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/9c9bb2b8fa12b33755f1366a53db73ca\/668\/452\/MODE\/e246b9\/7288794-3c1f2o.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/9c9bb2b8fa12b33755f1366a53db73ca\/95\/95\/MODE\/cbe50d\/7288794-3c1f2o.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/9c9bb2b8fa12b33755f1366a53db73ca\/856\/550\/MODE\/b9acb2\/7288794-3c1f2o.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/9c9bb2b8fa12b33755f1366a53db73ca\/416\/272\/MODE\/8fa7f8\/7288794-3c1f2o.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/9c9bb2b8fa12b33755f1366a53db73ca\/1312\/894\/MODE\/9a6ed5\/7288794-3c1f2o.jpg"}},{"type":"property_image","id":"114347458","attributes":{"id":"114347458","path":"7288794-84d5ao.jpg","number":9,"version":"e40bab877da2c28a3f609ed62dbbd50c","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/e40bab877da2c28a3f609ed62dbbd50c\/338\/248\/MODE\/2ea34e\/7288794-84d5ao.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/e40bab877da2c28a3f609ed62dbbd50c\/668\/452\/MODE\/98d8b5\/7288794-84d5ao.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/e40bab877da2c28a3f609ed62dbbd50c\/260\/185\/MODE\/e4b834\/7288794-84d5ao.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/e40bab877da2c28a3f609ed62dbbd50c\/668\/452\/MODE\/98d8b5\/7288794-84d5ao.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/e40bab877da2c28a3f609ed62dbbd50c\/95\/95\/MODE\/a8bacf\/7288794-84d5ao.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/e40bab877da2c28a3f609ed62dbbd50c\/856\/550\/MODE\/2349dd\/7288794-84d5ao.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/e40bab877da2c28a3f609ed62dbbd50c\/416\/272\/MODE\/19e85f\/7288794-84d5ao.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/e40bab877da2c28a3f609ed62dbbd50c\/1312\/894\/MODE\/e500d1\/7288794-84d5ao.jpg"}},{"type":"property_image","id":"114347462","attributes":{"id":"114347462","path":"7288794-2b495o.jpg","number":10,"version":"add9e61f7cb8a1d4efdfb8b250702644","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/add9e61f7cb8a1d4efdfb8b250702644\/338\/248\/MODE\/7b730b\/7288794-2b495o.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/add9e61f7cb8a1d4efdfb8b250702644\/668\/452\/MODE\/ba5985\/7288794-2b495o.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/add9e61f7cb8a1d4efdfb8b250702644\/260\/185\/MODE\/0492f5\/7288794-2b495o.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/add9e61f7cb8a1d4efdfb8b250702644\/668\/452\/MODE\/ba5985\/7288794-2b495o.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/add9e61f7cb8a1d4efdfb8b250702644\/95\/95\/MODE\/4886b9\/7288794-2b495o.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/add9e61f7cb8a1d4efdfb8b250702644\/856\/550\/MODE\/db0866\/7288794-2b495o.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/add9e61f7cb8a1d4efdfb8b250702644\/416\/272\/MODE\/1ab1b2\/7288794-2b495o.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/add9e61f7cb8a1d4efdfb8b250702644\/1312\/894\/MODE\/c847c8\/7288794-2b495o.jpg"}},{"type":"property_image","id":"114347465","attributes":{"id":"114347465","path":"7288794-e121eo.jpg","number":11,"version":"afc746f4d4d17811b627df80ff27030d","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/afc746f4d4d17811b627df80ff27030d\/338\/248\/MODE\/c362b8\/7288794-e121eo.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/afc746f4d4d17811b627df80ff27030d\/668\/452\/MODE\/129121\/7288794-e121eo.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/afc746f4d4d17811b627df80ff27030d\/260\/185\/MODE\/ed8893\/7288794-e121eo.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/afc746f4d4d17811b627df80ff27030d\/668\/452\/MODE\/129121\/7288794-e121eo.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/afc746f4d4d17811b627df80ff27030d\/95\/95\/MODE\/ad15bc\/7288794-e121eo.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/afc746f4d4d17811b627df80ff27030d\/856\/550\/MODE\/49aafe\/7288794-e121eo.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/afc746f4d4d17811b627df80ff27030d\/416\/272\/MODE\/9eb3dc\/7288794-e121eo.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/afc746f4d4d17811b627df80ff27030d\/1312\/894\/MODE\/ed5d0c\/7288794-e121eo.jpg"}},{"type":"property_image","id":"114347468","attributes":{"id":"114347468","path":"7288794-dd57co.jpg","number":12,"version":"accb61353b6c57d8a16256a4298acb82","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/accb61353b6c57d8a16256a4298acb82\/338\/248\/MODE\/64e681\/7288794-dd57co.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/accb61353b6c57d8a16256a4298acb82\/668\/452\/MODE\/23517c\/7288794-dd57co.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/accb61353b6c57d8a16256a4298acb82\/260\/185\/MODE\/112c3e\/7288794-dd57co.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/accb61353b6c57d8a16256a4298acb82\/668\/452\/MODE\/23517c\/7288794-dd57co.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/accb61353b6c57d8a16256a4298acb82\/95\/95\/MODE\/1dbfbb\/7288794-dd57co.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/accb61353b6c57d8a16256a4298acb82\/856\/550\/MODE\/3546b3\/7288794-dd57co.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/accb61353b6c57d8a16256a4298acb82\/416\/272\/MODE\/555866\/7288794-dd57co.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/accb61353b6c57d8a16256a4298acb82\/1312\/894\/MODE\/93058a\/7288794-dd57co.jpg"}},{"type":"property_image","id":"114347471","attributes":{"id":"114347471","path":"7288794-986beo.jpg","number":13,"version":"d266ed2b3512e70817fabb4157169838","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/d266ed2b3512e70817fabb4157169838\/338\/248\/MODE\/6170d4\/7288794-986beo.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/d266ed2b3512e70817fabb4157169838\/668\/452\/MODE\/3d6128\/7288794-986beo.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/d266ed2b3512e70817fabb4157169838\/260\/185\/MODE\/2b1395\/7288794-986beo.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/d266ed2b3512e70817fabb4157169838\/668\/452\/MODE\/3d6128\/7288794-986beo.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/d266ed2b3512e70817fabb4157169838\/95\/95\/MODE\/5fe920\/7288794-986beo.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/d266ed2b3512e70817fabb4157169838\/856\/550\/MODE\/8e2a45\/7288794-986beo.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/d266ed2b3512e70817fabb4157169838\/416\/272\/MODE\/025416\/7288794-986beo.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/d266ed2b3512e70817fabb4157169838\/1312\/894\/MODE\/80e1be\/7288794-986beo.jpg"}},{"type":"property_image","id":"114347474","attributes":{"id":"114347474","path":"7288794-04b66o.jpg","number":14,"version":"cf69bf9e5a5505593f96cb25dd42cfca","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/cf69bf9e5a5505593f96cb25dd42cfca\/338\/248\/MODE\/7e0432\/7288794-04b66o.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/cf69bf9e5a5505593f96cb25dd42cfca\/668\/452\/MODE\/ba69c7\/7288794-04b66o.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/cf69bf9e5a5505593f96cb25dd42cfca\/260\/185\/MODE\/13e481\/7288794-04b66o.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/cf69bf9e5a5505593f96cb25dd42cfca\/668\/452\/MODE\/ba69c7\/7288794-04b66o.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/cf69bf9e5a5505593f96cb25dd42cfca\/95\/95\/MODE\/71a043\/7288794-04b66o.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/cf69bf9e5a5505593f96cb25dd42cfca\/856\/550\/MODE\/bd681a\/7288794-04b66o.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/cf69bf9e5a5505593f96cb25dd42cfca\/416\/272\/MODE\/a4805b\/7288794-04b66o.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/cf69bf9e5a5505593f96cb25dd42cfca\/1312\/894\/MODE\/881feb\/7288794-04b66o.jpg"}},{"type":"property_image","id":"114347479","attributes":{"id":"114347479","path":"7288794-4dfbeo.jpg","number":15,"version":"71b656057b2835632db4da97ad9badfd","is_default":false},"links":{"homepage":"https:\/\/m.propertyfinder.ae\/property\/71b656057b2835632db4da97ad9badfd\/338\/248\/MODE\/74f50f\/7288794-4dfbeo.jpg","cts":"https:\/\/m.propertyfinder.ae\/property\/71b656057b2835632db4da97ad9badfd\/668\/452\/MODE\/47f3b7\/7288794-4dfbeo.jpg","small":"https:\/\/m.propertyfinder.ae\/property\/71b656057b2835632db4da97ad9badfd\/260\/185\/MODE\/20ccab\/7288794-4dfbeo.jpg","medium":"https:\/\/m.propertyfinder.ae\/property\/71b656057b2835632db4da97ad9badfd\/668\/452\/MODE\/47f3b7\/7288794-4dfbeo.jpg","thumb":"https:\/\/m.propertyfinder.ae\/property\/71b656057b2835632db4da97ad9badfd\/95\/95\/MODE\/2c95dc\/7288794-4dfbeo.jpg","new_big":"https:\/\/m.propertyfinder.ae\/property\/71b656057b2835632db4da97ad9badfd\/856\/550\/MODE\/0cd7b0\/7288794-4dfbeo.jpg","new_small":"https:\/\/m.propertyfinder.ae\/property\/71b656057b2835632db4da97ad9badfd\/416\/272\/MODE\/019603\/7288794-4dfbeo.jpg","full_screen":"https:\/\/m.propertyfinder.ae\/property\/71b656057b2835632db4da97ad9badfd\/1312\/894\/MODE\/7dc898\/7288794-4dfbeo.jpg"}},{"type":"property_price","id":"36e8b7caea931e1e25c72a77a0cab324","attributes":{"price":280000},"relationships":{"price_type":{"data":{"type":"price_type","id":"4"}}},"meta":{"price_text":"280,000 AED\/year"}},{"type":"price_type","id":"4","attributes":{"identifier":"yearly","label":"Yearly","name":"AED\/year"}}]},
shareUrl:
我想获取{“ homepage”:与shareUrl之间的值:
我的代码:
import json
import requests
import re
url = 'https://m.propertyfinder.ae/en/rent/apartment-for-rent-dubai-dubai-marina-marina-promenade-delphine-tower-7276805.html'
response = requests.get(url)
soup = BeautifulSoup(response.text, 'lxml')
all_scripts = soup.find_all('script')
images_script = all_scripts[6]
#images = re.search('{"type":"whatsapp","value":"([^"]+)" v', images_script.text).group(1)
#get_images = re.findall('"{"homepage":"([^"]+)"shareUrl:', images_script.text)
#"homepage":"","cts":"","small":"","medium":"","thumb":""}}
the_images = re.findall('"homepage":"([^"]+)","cts":"([^"]+)","small":"([^"]+)","medium":"([^"]+)","thumb":"([^"]+)"', images_script.text)
counter = 0
for myimg in the_images:
print(myimg[3])
counter = counter+1
print(counter)
它可以完美工作,但是它返回所有值,因为该页面还包含其他列表图像。 但我想限制它
{“首页”和shareUrl:
我的正则表达式需要进行哪些更改?
答案 0 :(得分:1)
您可以使用两次正则表达式。
ma = re.search("(homepage.*)\n\s{0,}shareUrl", images_script.text)
the_images = re.findall('"homepage":"([^"]+)","cts":"([^"]+)","small":"([^"]+)","medium":"([^"]+)","thumb":"([^"]+)"', ma.groups()[0])
第一个正则表达式在“主页”和“ shareUrl”之间找到文本,并在第二个中使用它来获取“ http ... jpg”。 (请注意:调整\ n \ s {0,}以获得返回值和空格。)
答案 1 :(得分:0)
group
通常在re.match
函数中使用。从我的角度来看,您只是想将所有结果都找回来。 re.findall
就是这样做的-除非您的正则表达式中有“或”语句(用|表示),否则re.findall
将返回与查询匹配的字符串列表。只需迭代列表并返回您想要的内容即可。查看您的正则表达式,它似乎很具体,因此可能只有第一个结果可以。
像这样:
webpage = requests.get(url).content
regex_experssion = re.compile("your_expression")
list_of_matches = regex_expression.findall(webpage)
return list_of_matches[0]
或
for i in range(len(list_of_matches)):
#run code to find relevant one
编辑:如果真正的问题是正则表达式查询本身,而不是python模块/它的返回值,则强烈建议使用在线正则表达式编辑器,并解释不同的标记: https://regex101.com/
答案 2 :(得分:0)
这是一个SimplifiedDoc解决方案。大多数代码会重用
import re
import requests
from simplified_scrapy.simplified_doc import SimplifiedDoc
url = 'https://m.propertyfinder.ae/en/rent/apartment-for-rent-dubai-dubai-marina-marina-promenade-delphine-tower-7276805.html'
response = requests.get(url)
doc = SimplifiedDoc(response.text)
html = '"homepage":'+doc.getSection(start='"homepage":',end='shareUrl:')
the_images = re.findall('"homepage":"([^"]+)","cts":"([^"]+)","small":"([^"]+)","medium":"([^"]+)","thumb":"([^"]+)"', html)
counter = 0
for myimg in the_images:
print(myimg[3])
counter = counter+1
print(counter)