-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add support for distributor TME (Issue #76) #79
Conversation
63e29aa
to
4dd2441
Compare
I add you file in a new branch that I am creating |
Hi @hildogjr,
Why?
I'll try to test it with some VPN. Maybe it will be enough to increase the number of attempts ( |
A just tried to add because one of the proposed modification in my new branch is that the user do not need to modify the main Also, I do not add the documentation to keep you request merge to main branch and authorship of the file when I request my merge. I am from Brazil, now it is working. I will try to modify the |
4dd2441
to
b6eeed2
Compare
Hi @hildogjr,
I think that's wrong. The standard approach is IMHO to add the support for TME in one PR and to do your refactoring in another PR (without the new file Also, the commit history is a bit convoluted -- commit named "Files restruturation (issue #77)" adds file Could you please revert it? I think it's enough to remove |
b6eeed2
to
327af00
Compare
Signed-off-by: Adam Heinrich <adam@adamh.cz>
327af00
to
0389e44
Compare
I've just updated the commit again to be in sync with the last changes in the structure. |
Adam, I merged your module into the master branch. It looks like getting part info out of TME is very complicated. Thanks for doing that! I added you to the list of authors. I did correct a small error that appeared when running KiCost under Python 3.5: I had to decode the response from the TME URL request into a string, otherwise |
Hi @xesscorp, thank you and sorry for the error. |
No problem, Adam. I do the same thing all the time. Thanks for the TME scraper! |
Now that we are adding new distributors. We may add some control when call |
The |
True, I read now. |
This PR implements #76. Contrary to other distributor implementations, the code has to do additional XmlHTTPRequests to obtain pricing information and stock availability (because the website is not loaded as a single HTML page).
This implementation does up to four HTTP requests per part. A modified implementation could reduce this to two requests (explained in a TODO comment). Is it OK to postpone this optimization to the future?