-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search API stopped working #13
Comments
Yes, that is the case. I reversed the API around last week and found a solution based on the new API. Not only the new API endpoint needs to be considered, but also the authentication needs to be changed due to the insufficient authorisations that the old bearer token has. Therefore, the MFA must also be taken into account. So I made a monkey patch to the Picnic package in advance, but best practice would be to set this up as a default in the latest official Python package. Nevertheless, considering these new things, everything works like a charm. |
Sorry for being a noob but does this mean its being fixed or already fixed? How can i get the monkey patch? |
Quick update: I'm currently implementing the fix for this, together with some other outdated types and featurs such as the bundling of products and planning to release it tomorrow! 😄 |
I've added nr 3 in the latest release since it was quite straight forward. For nr 4 I/we need to think about how to do this nicely, as some of the properties have to be extracted from the giant pml objects, which would be very sensitive to errors. Happy to hear your suggestions on this. |
@MRVDH, in my local copy I avoided parsing the whole pml structure by using a regex to find the article ids of the bundle options.
Based on the article ids the actual articles can be retrieved using the existing |
Added this in v3.1.1! Let me know if there can be more improvements, otherwise I'd say we can close this issue. |
It is working great - thanks for making the changes! |
@MRVDH, I'd like to have a crack at implementing fixes for this issue in the python-picnic-api as well. However, looking through the commit |
Hi @thijmen-j , sure! The commits are a bit messy due to formatting changes, so let me point you to the relevant pieces of code:
Let me know if that clears it up or if you need more info 👍 |
A few days ago the search api stopped working. There are a few things that need to be addressed to get it working again:
client_id
when logging in needs to be updated to30100
.x-picnic-agent
header needs to be updated to30100;1.15.232-15154
./pages/search-page-results?search_term=...
. The response is now json data that contains page layout and analytics information but the search results can be found by looking forselling_unit
./pages/bundle-overview-page?sole_article_id=...&show_category_action=true
provides that information. Thesole_article_id
is part of theselling_unit
object returned by thesearch-page-results
api. The article ids can be fetched by using the regex/"product-page-bundle-item-(s[0-9]+)"/
.x-picnic-agent
needs to be part of the request.Making the first two changes is easy. However, it is hard to maintain the current api when updating point 3 and 4 for the following reasons:
selling_unit
's decorators any more.The text was updated successfully, but these errors were encountered: