goodbye oauth
This commit is contained in:
parent
4b7e4da6da
commit
545517b7f6
@ -1,3 +1,5 @@
|
||||
### 2024-11-09: a guy called david stein said on stackoverflow that refresh tokens are scuffed when google considers an application to be "testing" and not development. Up until this point refresh tokens with oauth2 worked fine but not any more. this is now resolved by using cookies instead althought many people advised strongly against such use. Lets pray it works. It in reality just requires generating the cookies from chrome webbrowser from time to time. Atm this is done by logging into the ovh machine with x2go, opening chrome in web browser, logging into an gmail account so verification is there.
|
||||
|
||||
# Torchlight3
|
||||
|
||||
## 0. Requirements
|
||||
|
@ -114,7 +114,7 @@ class URLFilter(BaseCommand):
|
||||
if TimeStr:
|
||||
Time = Utils.ParseTime(TimeStr)
|
||||
|
||||
Proc = await asyncio.create_subprocess_exec("yt-dlp", "--dump-json", "--username", "oauth2", "--password", "''", "-g", url,
|
||||
Proc = await asyncio.create_subprocess_exec("yt-dlp", "--cookies-from-browser", "chrome", "--dump-json", "-g", url,
|
||||
stdout = asyncio.subprocess.PIPE)
|
||||
Out, _ = await Proc.communicate()
|
||||
|
||||
@ -704,7 +704,7 @@ class YouTubeSearch(BaseCommand):
|
||||
message[1] = message[1][:Temp.value]
|
||||
|
||||
search_term = message[1].split("pitch=")[0].split("tempo=")[0].split('backward=')[0].split('backwards=')[0]
|
||||
Proc = await asyncio.create_subprocess_exec("yt-dlp", "--dump-json", "--username", "oauth2", "--password", "''", "-xg", "ytsearch:" + search_term,
|
||||
Proc = await asyncio.create_subprocess_exec("yt-dlp", "--dump-json", "--cookies-from-browser", "chrome", "-xg", "ytsearch:" + search_term,
|
||||
stdout = asyncio.subprocess.PIPE)
|
||||
Out, _ = await Proc.communicate()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user