Closed bockjoo closed 1 year ago
python3.9 사용하고 있습니다.
investing/data.py 20번째 줄에서 requests 403 에러가 납니다. curl을 사용하면 문제가 없습니다:
import shlex, subprocess import json cmd = '''curl -H 'Accept-Language: en-US,en' -H 'Accept: text/html,application/xhtml+xml,application/xml,application/json' -H 'Authority: www.google.com' -H 'User-Agent: SomeAgent' -H 'Upgrade-Insecure-Requests: 1' ''' args = shlex.split(cmd) args.append(url) process = subprocess.Popen(args, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if process.returncode == 0: raise ValueError(f'Symbol "{symbol}" not accessible from '+url) r, stderr = process.communicate() jo = json.loads(r)
그리고 69줄에서 https://iappapi.investing.com/get_screen.php?lang_ID=51&skinID=2&interval=day&time_utc_offset=7200&screen_ID=63&pair_ID=44336&date_from=01012010&date_to=09032020 가 빈 output을 return합니다. iappapi.investing.com API가 깨진 겁니까?
issue #166문제와 같은 문젠네요.
python3.9 사용하고 있습니다.
investing/data.py 20번째 줄에서 requests 403 에러가 납니다. curl을 사용하면 문제가 없습니다:
r = requests.get(url, headers={'user-agent':'Mozilla/5.0', 'domain-id': 'en', 'dnt': '1'})
그리고 69줄에서 https://iappapi.investing.com/get_screen.php?lang_ID=51&skinID=2&interval=day&time_utc_offset=7200&screen_ID=63&pair_ID=44336&date_from=01012010&date_to=09032020 가 빈 output을 return합니다. iappapi.investing.com API가 깨진 겁니까?