Automatic Extract API Not Working even post buying Professional Plan

Posted over 2 years ago by Virendra Oswal

Post a topic
Un Answered
V
Virendra Oswal

I got API Key from my settings, and then I started free trial against professional plan but i get 401 error when i execute API via Python module.


 

pip install zyte-autoextract

 

from autoextract.sync import request_raw


 

query = [{

    'url''https://finance.yahoo.com/news/july-13th-bottom-why-jim-151800689.html',

    'pageType''article'

}]

results = request_raw(query, api_key='<my-api-key>')

print(results[0]['article'])



I get follow error:


HTTPError                                 Traceback (most recent call last)
<ipython-input-5-a3ce94e201a9> in <module>()
      3     'pageType': 'article'
      4 }]
----> 5 results = request_raw(query, api_key='<my-api-key>')
      6 print(results[0]['article'])

1 frames

/usr/local/lib/python3.7/dist-packages/requests/models.py in raise_for_status(self)
    939 
    940         if http_error_msg:
--> 941             raise HTTPError(http_error_msg, response=self)
    942 
    943     def close(self):


HTTPError: 401 Client Error: Unauthorized for url: https://autoextract.scrapinghub.com/v1/extract

3 Votes


0 Comments

Login to post a comment