Forum Discussion
AustinK
5 years agoQrew Commander
What is the ultimate goal here? You want to load the word document in your web browser and view it like that?
When using the requests module it will send you back the raw HTML like you are seeing. You are running it in something like Google Collab? You are running a DoQuery and then seeing the results of that printed out. If you do the same DoQuery via a URL manually you would see the same thing in your browser. That is a success message telling you that everything worked. However it is not doing what you expect it to.
If you want to load a file you need to figure out the link first and then do the same GET request but for the exact file you want and that should return the raw file to you, so all the text.
When using the requests module it will send you back the raw HTML like you are seeing. You are running it in something like Google Collab? You are running a DoQuery and then seeing the results of that printed out. If you do the same DoQuery via a URL manually you would see the same thing in your browser. That is a success message telling you that everything worked. However it is not doing what you expect it to.
If you want to load a file you need to figure out the link first and then do the same GET request but for the exact file you want and that should return the raw file to you, so all the text.
preetiverma1
5 years agoQrew Member
My goal here is to get the track changes record ( means to get the new inserted text and deleted text from the word document) . i am able to capture the changes when i get the document from the local but when i read the document using python from QB then its returning the raw HTML.
i am able to get the record data with the document URL.
when i read the document using below code its giving me raw HTML.
wordfile=urlopen("document URL ").read()
Thanks
------------------------------
preeti verma
------------------------------
i am able to get the record data with the document URL.
when i read the document using below code its giving me raw HTML.
wordfile=urlopen("document URL ").read()
Thanks
------------------------------
preeti verma
------------------------------
- AustinK5 years agoQrew CommanderI will try and look into this more tomorrow. I was getting similar results as you when testing against my own docx file hosted in Quick Base. Seeing the HTML and honestly it feels like it is not authenticated properly. It should be possible to visit the URL and get the file back in some form. I know docx can be annoying to deal with though.
- preetiverma5 years agoQrew MemberSure Austin.
Sent from my iPhone