Python Forum
Problem with NTLM to download data - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Problem with NTLM to download data (/thread-1296.html)



Problem with NTLM to download data - azahar - Dec-21-2016

Hello,

I am new in python and after two days of research I am stuck on a little issue with API and NTLM package for Anaconda. I want to grab data from my office's website (we need to use credentials) it was working perfectly on the IDE provided by Python but for various reasons I have decided to switch for Anaconda. I try to use the same code on Spyder (with anaconda) if I use the version 2.7 I have an error 401 but the code is 'working' otherwise I have on the IDE 3.5 an error occuring due to the ntlm package.

Any help would be nice please I give you a draft of the code I wrote (the one which is working on python IDE):
def Elastik(date,algo=""):

   import requests
   from ntlm import HTTPNtlmAuthHandler

    url='blabla'
    user="toto"
    password="toto"
    response=requests.get(url,auth=HttpNtlmAuth(user,password))
    response=str(response.text).split(",")
    return result
Thx in advance for the help provided!!!!!!


RE: Problem with NTLM to download data - Larz60+ - Dec-21-2016

When you installed NLTK did you install the Corpus?
If you need instructions, they are here