现在不能用吧〉 第一个地址不一样了,返回 104 , 看了下URL
def _update(self):
"""Get the latest data from He Weather and updates the states."""
url = 'http://gaoqing.fm/ajax.php?p=1&sort=new'
改HTTPS后可以打开URL,但是后面有变量类型的抱错,我就不懂了,放弃,。
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 325, in wrapper
result = method(*args, **kwargs)
File "/home/homeassistant/.homeassistant/custom_components/sensor/moviehd.py", line 210, in _update
movie_score[name] = float(imdb_score)
TypeError: float() argument must be a string or a number, not 'NoneType'