mirror of
https://github.com/karl0ss/GoGoDownloader.git
synced 2025-04-25 19:20:12 +01:00
latest commit
This commit is contained in:
parent
d865913154
commit
62712a3897
3
CLIOutput/eng.bat
Normal file
3
CLIOutput/eng.bat
Normal file
@ -0,0 +1,3 @@
|
||||
for /R %%a in ("*.mp4") do MP4Box -lang eng "%%a"
|
||||
|
||||
exit
|
@ -16,7 +16,7 @@ except AttributeError:
|
||||
|
||||
|
||||
def gogodownloader(config):
|
||||
CURRENT_DOMAIN = config["CurrentGoGoAnimeDomain"]
|
||||
CURRENT_URL = config["CurrentGoGoAnimeURL"]
|
||||
os.system("cls" if os.name == "nt" else "clear")
|
||||
while True:
|
||||
print(
|
||||
@ -45,7 +45,7 @@ def gogodownloader(config):
|
||||
title = name.replace("-", " ").title().strip()
|
||||
else:
|
||||
title = name.title().strip()
|
||||
source = f"https://gogoanime.{CURRENT_DOMAIN}/category/{name}"
|
||||
source = f"https://{CURRENT_URL}/category/{name}"
|
||||
with requests.get(source) as res:
|
||||
if res.status_code == 200:
|
||||
soup = BeautifulSoup(res.content, "html.parser")
|
||||
@ -139,7 +139,7 @@ def gogodownloader(config):
|
||||
title,
|
||||
)
|
||||
gogo.user_logged_in_check()
|
||||
source = f"https://gogoanime.{CURRENT_DOMAIN}/{name}"
|
||||
source = f"https://{CURRENT_URL}/{name}"
|
||||
with requests.get(source) as res:
|
||||
soup = BeautifulSoup(res.content, "html.parser")
|
||||
episode_zero = soup.find("h1", {"class": "entry-title"}) # value: 404
|
||||
|
40
GoGoDownloaderCLI.spec
Normal file
40
GoGoDownloaderCLI.spec
Normal file
@ -0,0 +1,40 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
|
||||
block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(['GoGoDownloaderCLI.py'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False)
|
||||
pyz = PYZ(a.pure, a.zipped_data,
|
||||
cipher=block_cipher)
|
||||
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name='GoGoDownloaderCLI',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True,
|
||||
disable_windowed_traceback=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None )
|
32
backend.py
32
backend.py
@ -94,18 +94,18 @@ class gogoanime:
|
||||
def get_gogoanime_auth_cookie(self):
|
||||
session = requests.session()
|
||||
page = session.get(
|
||||
f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/login.html"
|
||||
f"https://{self.config['CurrentGoGoAnimeURL']}/login.html"
|
||||
)
|
||||
soup = BeautifulSoup(page.content, "html.parser")
|
||||
meta_path = soup.select('meta[name="csrf-token"]')
|
||||
csrf_token = meta_path[0].attrs["content"]
|
||||
|
||||
url = f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/login.html"
|
||||
url = f"https://{self.config['CurrentGoGoAnimeURL']}/login.html"
|
||||
payload = f"email={self.config['GoGoAnime_Username']}&password={self.config['GoGoAnime_Password']}&_csrf={csrf_token}"
|
||||
headers = {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36",
|
||||
"authority": "gogo-cdn.com",
|
||||
"referer": f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/",
|
||||
"referer": f"https://{self.config['CurrentGoGoAnimeURL']}/",
|
||||
"content-type": "application/x-www-form-urlencoded",
|
||||
}
|
||||
session.headers = headers
|
||||
@ -121,7 +121,7 @@ class gogoanime:
|
||||
self,
|
||||
):
|
||||
page = requests.get(
|
||||
f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/one-piece-episode-1",
|
||||
f"https://{self.config['CurrentGoGoAnimeURL']}/one-piece-episode-1",
|
||||
cookies=dict(auth=gogoanime.get_gogoanime_auth_cookie(self)),
|
||||
)
|
||||
soup = BeautifulSoup(page.content, "html.parser")
|
||||
@ -133,14 +133,14 @@ class gogoanime:
|
||||
|
||||
def get_links(self, source=None):
|
||||
if source is not None:
|
||||
source_ep = f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/{self.name}-episode-"
|
||||
source_ep = f"https://{self.config['CurrentGoGoAnimeURL']}/{self.name}-episode-"
|
||||
episode_links = [
|
||||
f"{source_ep}{i}"
|
||||
for i in range(self.episode_start, self.episode_end + 1)
|
||||
]
|
||||
episode_links.insert(0, source)
|
||||
else:
|
||||
source_ep = f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/{self.name}-episode-"
|
||||
source_ep = f"https://{self.config['CurrentGoGoAnimeURL']}/{self.name}-episode-"
|
||||
episode_links = [
|
||||
f"{source_ep}{i}"
|
||||
for i in range(self.episode_start, self.episode_end + 1)
|
||||
@ -197,19 +197,21 @@ class gogoanime:
|
||||
("authority", "gogo-cdn.com"),
|
||||
(
|
||||
"referer",
|
||||
f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/",
|
||||
f"https://{self.config['CurrentGoGoAnimeURL']}/",
|
||||
),
|
||||
]
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
for link in file_list:
|
||||
if link is not None:
|
||||
dl.enqueue_file(
|
||||
link,
|
||||
path=f"./{self.title}",
|
||||
)
|
||||
|
||||
try:
|
||||
dl.enqueue_file(
|
||||
link,
|
||||
path=f"./{self.title}",
|
||||
)
|
||||
except:
|
||||
pass
|
||||
files = dl.download()
|
||||
return files
|
||||
|
||||
@ -218,7 +220,7 @@ class gogoanime:
|
||||
bookmarkList = []
|
||||
a = dict(auth=gogoanime.get_gogoanime_auth_cookie(self))
|
||||
resp = requests.get(
|
||||
f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/user/bookmark",
|
||||
f"https://{self.config['CurrentGoGoAnimeURL']}/user/bookmark",
|
||||
cookies=a,
|
||||
)
|
||||
soup = BeautifulSoup(resp.text, "html.parser")
|
||||
@ -242,7 +244,7 @@ class gogoanime:
|
||||
{
|
||||
"showName": animeName,
|
||||
"latestEpisode": int(episodeNum),
|
||||
"downloadURL": f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/{animeDownloadName}-episode-{str(episodeNum)}",
|
||||
"downloadURL": f"https://{self.config['CurrentGoGoAnimeURL']}/{animeDownloadName}-episode-{str(episodeNum)}",
|
||||
}
|
||||
)
|
||||
with open("bookmarkList.json", "w") as f:
|
||||
|
@ -2,7 +2,7 @@
|
||||
"GoGoAnime_Username":"",
|
||||
"GoGoAnime_Password":"",
|
||||
"MaxConcurrentDownloads": 4,
|
||||
"CurrentGoGoAnimeDomain": "gg",
|
||||
"CurrentGoGoAnimeURL": "gogoanime3.net",
|
||||
"OverwriteDownloads": 0,
|
||||
"CLIQuality":"720",
|
||||
"CLIDownloadLocation": "CLIOutput",
|
||||
|
1
winRun.bat
Normal file
1
winRun.bat
Normal file
@ -0,0 +1 @@
|
||||
cd C:\Users\Karl.Hudgell\Documents\GoGoDownloader && venv\Scripts\activate && python GoGoDownloaderCLI.py
|
Loading…
x
Reference in New Issue
Block a user