简体   繁体   中英

Decode and extract profile ID from the url

I am trying to scrape the following page:

https://www.realtor.ca/real-estate/22241746/7192z-boul-henri-bourassa-o-montr%C3%A9al-saint-laurent-new-saint-laurentbois-franc#view=neighbourhood

The page is using a third party application generate the neighbourhood ratings and below is the call it makes

https://api.locallogic.co/v1/scores/bG9jYWxsb2dpYweyJ0b2tlbiI6ImI3NTA1YjRkYjNlMjM1Y2IxYTA0MzBmYjAwMzhlOGRhOTdiMzI1N2E2Mzc2YTUwODVhMmRmZWQ3OTExZmZkZmQzODE2NGVhYjBiOTczNDBkIiwibGF0IjoiNDUuN***TA4NjU2MzgiLCJsbmciOiItNzMuNzM0OTA1MzUifQ==** *

The highlighted part in the above call encode the following profile (Id or Some other characteristic)

Profile : 22241746/7192z-boul-henri-bourassa-o-montr%C3%A9al-saint-laurent-new-saint-laurentbois-franc

MLS Number : 9104133

I am not able to understand how may have been encoded but know that the Long Lat are required by this API, Would really appreciate if someone can help

PS: I do not want the API key as I will be using my own

Resolved,

when used base64 decoder, I got locallogic 'F V # &#sSV#FF#6S#3V6#C3f#3 S F v#3#Svc3sfS V&FfVCs ffFfC3 cFV## s3CB" & B# #CR S cSc3 " & r# " s2 s3C S3R'

from the input I removed the code that decodes to locallogic and voila

Remaining code when decoded returns a perfect dictionary

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM