A few months ago we started to get plan urls for the new Mavat API. For each plan, we have either have URL, or new_mavat_url.
The new mavat URL is the only URL we need as the old mavat is off. Yet, as we get the URL from the Blue Lines API, there are all the old plans, that had been fetched before we migrated to the new mavat, that miss the new mavat URL.
This task therefore is to add the new_mavat_url to all plans, so they can be re-fetched and rescrapped at some point. The new mavat URL is of this structure:
https://mavat.iplan.gov.il/SV4/1/5000732931/310
while this is the format :
https://mavat.iplan.gov.il/SV4/1/{MP_ID}/310
The agam_id is the id at the new mavat, so in order to get the new mavat link we need to get it. The way to get the mp Id is to use the Search functionality at the new mavat website: https://mavat.iplan.gov.il/SV1
.
To that searchbox, you may enter the plan ID (PL_NUMBER as stored for all plans in the DB), and then, if only one plan matches that ID, you're redirected to the plan page, where the agam_id can be extracted from the URL.
The script should run for all plans that don't have the MP_ID, and fill both fields
We used to have that function for the old mavat, so you may use the existing function, called search.
A few months ago we started to get plan urls for the new Mavat API. For each plan, we have either have URL, or new_mavat_url. The new mavat URL is the only URL we need as the old mavat is off. Yet, as we get the URL from the Blue Lines API, there are all the old plans, that had been fetched before we migrated to the new mavat, that miss the new mavat URL.
This task therefore is to add the new_mavat_url to all plans, so they can be re-fetched and rescrapped at some point. The new mavat URL is of this structure:
https://mavat.iplan.gov.il/SV4/1/5000732931/310
while this is the format :https://mavat.iplan.gov.il/SV4/1/{MP_ID}/310
The
agam_id
is the id at the new mavat, so in order to get the new mavat link we need to get it. The way to get the mp Id is to use the Search functionality at the new mavat website: https://mavat.iplan.gov.il/SV1 .To that searchbox, you may enter the plan ID (PL_NUMBER as stored for all plans in the DB), and then, if only one plan matches that ID, you're redirected to the plan page, where the agam_id can be extracted from the URL.
The script should run for all plans that don't have the
MP_ID
, and fill both fieldsWe used to have that function for the old mavat, so you may use the existing function, called
search
.