Fix #36: Make the program stops by crashing on YouTube operational API instance being detected as sending unusual traffic
This commit is contained in:
parent
4508b12b6c
commit
9b792015fa
4
main.cpp
4
main.cpp
@ -705,6 +705,10 @@ json getJson(unsigned short threadId, string url, bool usingYoutubeDataApiv3, st
|
|||||||
|
|
||||||
if(data.contains("error"))
|
if(data.contains("error"))
|
||||||
{
|
{
|
||||||
|
if(!usingYoutubeDataApiv3)
|
||||||
|
{
|
||||||
|
EXIT_WITH_ERROR("Found error in JSON retrieve from YouTube operational API at URL: " << finalUrl << " for content: " << content << " !")
|
||||||
|
}
|
||||||
string reason = data["error"]["errors"][0]["reason"];
|
string reason = data["error"]["errors"][0]["reason"];
|
||||||
// Contrarily to YouTube operational API no-key service we don't rotate keys in `KEYS_FILE_PATH`, as we keep them in memory here.
|
// Contrarily to YouTube operational API no-key service we don't rotate keys in `KEYS_FILE_PATH`, as we keep them in memory here.
|
||||||
if(reason == "quotaExceeded")
|
if(reason == "quotaExceeded")
|
||||||
|
Loading…
Reference in New Issue
Block a user