【发布时间】:2018-11-14 09:25:24
【问题描述】:
我一直在尝试从这个链接获取信息:HIDDEN
这是我当前的代码
public static string newsLink = "HIDDEN";
public static readonly List<string> newsList = new List<string>();
void Start () {
DontDestroyOnLoad (gameObject);
StartCoroutine (GetNews ());
}
IEnumerator GetNews(){
WWW w = new WWW (newsLink);
yield return w;
if (w.error != null) {
print (w.error);
} else {
List<string>temp = w.text.Split (']').ToList ();
foreach(string a in temp)
{
newsList.Add (a);
}
w.Dispose ();
}
}
}
在调试器中我收到 403 Forbidden 的错误消息
【问题讨论】: