When I request https://etherchain.org/api/difficulty using python 3.6 I get HTTPError: Forbidden. Does anyone know the solution?
import json
from urllib.request import urlopen
from pandas.io.json import json_normalize
r_difficulty_eth =
urlopen('https://etherchain.org/api/difficulty').read().decode('UTF-8')
difficulty_eth_data = json.loads(r_difficulty_eth)