1

I'm writing a python script to run Alchemy API. I tested the script on text docs and it works well, my problem raised when my input is URL. Most of the time Alchemy's algorithm response OK but sometimes it's response error 404. I checked the failed urls on Alchemy's demo and the algorithm works well (it means the url isn't broken).

*I looked in old posts and I tried to replace in the url problematic characters "\n", "\r" to "" , none of them worked.

Do you have any suggestions what cause this error?

UPDATE I solved the problem, I used the old api 'Category' instead of 'Taxonomy'. To extract category instead of using:

response = alchemy.category('text', input_data)        
if response['status'] == 'OK':                    
                    category_name = response["category"]

use:

response = alchemy.taxonomy('text', input_data)
if response['status'] == 'OK':
            category_name = response['taxonomy'][0]['label']
Tim
  • 41,901
  • 18
  • 127
  • 145
Idan Azuri
  • 623
  • 4
  • 17

0 Answers0