mirror of
https://onedev.site.tesses.net/tytd2025
synced 2026-02-08 17:45:45 +00:00
Fix thumbnail error
This commit is contained in:
@@ -1569,7 +1569,15 @@ class TYTD.Downloader {
|
|||||||
this.RateLimit();
|
this.RateLimit();
|
||||||
var response = Net.Http.MakeRequest(url,requestData);
|
var response = Net.Http.MakeRequest(url,requestData);
|
||||||
if(response.StatusCode != 200) throw "Not success";
|
if(response.StatusCode != 200) throw "Not success";
|
||||||
var data = Json.Decode(response.ReadAsString());
|
const text = response.ReadAsString();
|
||||||
|
var data = {};
|
||||||
|
try {
|
||||||
|
data = Json.Decode(text);
|
||||||
|
} catch(ex) {
|
||||||
|
this.Storage.CreateDirectory(/"CorruptedJson");
|
||||||
|
FS.WriteAllText(this.Storage,/"CorruptedJson"/$"{DateTime.NowEpoch}.json", text);
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
var cr = data.contents.twoColumnWatchNextResults.playlist.playlist;
|
var cr = data.contents.twoColumnWatchNextResults.playlist.playlist;
|
||||||
if(cr == null || cr == undefined)
|
if(cr == null || cr == undefined)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user