简体   繁体   English

从 url 中解码并提取配置文件 ID

[英]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 https://www.realtor.ca/real-estate/22241746/7192z-boul-henri-bourassa-o-montr%C3%A9al-saint-laurent-new-saint-laurentbois-franc#view=neighborhood

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==** * https://api.locallogic.co/v1/scores/bG9jYWxsb2dpYweyJ0b2tlbiI6ImI3NTA1YjRkYjNlMjM1Y2IxYTA0MzBmYjAwMzhlOGRhOTdiMzI1N2E2Mzc2YTUwODVhMmRmZWQ3OTExZmZkZmQzODE2NGVhYjBiOTczNDBkIiwibGF0IjoiNDUuN***TA4NjU2MzgiLCJsbmciOiItNzMuNzM0OTA1MzUifQ==** *

The highlighted part in the above call encode the following profile (Id or Some other characteristic)上述调用中突出显示的部分编码以下配置文件(Id 或其他一些特征)

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我无法理解可能是如何编码的,但知道此 API 需要 Long Lat,如果有人可以提供帮助,我将不胜感激

PS: I do not want the API key as I will be using my own PS:我不想要 API 密钥,因为我将使用我自己的

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' 使用base64解码器时,我得到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从输入中我删除了解码为 locallogic 的代码,瞧

Remaining code when decoded returns a perfect dictionary解码后的剩余代码返回一个完美的字典

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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