To use chat, please login.
Back to contacts
Jan 28 at 07:34
6 件の投稿
I am trying to get community outlook data, sending minute by minute requests, using JSON. It works once and I am getting an error in the next minute's try. Here are the code and the error, has someone had a similar problem? or any idea to fix it?

import requests
import json
Login = ''
Login_response = requests.get(Login, verify = False)
Login_data = Login_response.json()
session_id = Login_data['session']
Outlook='' + session_id
Outlook_response = requests.get(Outlook, verify = False)
Outlook_data = Outlook_response.json()['symbols']

Outlook_data = Outlook_response.json()['symbols']
  File 'C:\Python\lib\site-packages\requests\', line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File 'C:\Python\lib\json\', line 357, in loads
    return _default_decoder.decode(s)
  File 'C:\Python\lib\json\', line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File 'C:\Python\lib\json\', line 355, in raw_decode
    raise JSONDecodeError('Expecting value', s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Vanza Dorbey (vanzadorbey)
Feb 23 at 21:29
27 件の投稿
Thanks man, appreciate it. Are you paying for outlook data? If not you can only call api 15 minutes max.
Anyway thanks for the code hahahah

6 件の投稿
Thanks for sharing the code. I would love to use it but before that, I would like to know how it worked when you used it on your account.

6 件の投稿
Np, for avoiding the mentioned error you need to run the first part once (till the sixth line), and repeat only the second part every 15 minutes or more, using a loop or any other technic. Free accounts are not able to collect data in less than 15 minutes time frames. Also, replace the email and password with your account information and log out at the end.