diff --git a/worker.py b/worker.py index 5dbd98b..06e68e1 100644 --- a/worker.py +++ b/worker.py @@ -88,6 +88,17 @@ if not (cookies["HSID"] and cookies["SSID"] and cookies["SID"]): mysession = requests.session() mysession.headers.update({"cookie": "HSID="+cookies["HSID"]+"; SSID="+cookies["SSID"]+"; SID="+cookies["SID"], "Accept-Language": "en-US",}) +validationtest = mysession.get("https://www.youtube.com/timedtext_editor?action_mde_edit_form=1&v=1iNTtHUwvq4&lang=en&bl=vmp&ui=hd&ref=player&tab=captions&o=U") + +assert not "accounts.google.com" in validationtest.url, "Please ensure you have correctly specified account cookies." +assert """""" in validationtest.text, "Please make sure your YouTube and Google account language is set to English (United States)" + +del validationtest + open("cookies.txt", "w").write("""# HTTP Cookie File .youtube.com TRUE / FALSE 1663793455 SID [SID] .youtube.com TRUE / FALSE 1663793455 HSID [HSID]