Compare commits

...

11 Commits

Author SHA1 Message Date
Karl Hudgell
f55d917cc9 quick .5 fix 2024-03-02 11:23:02 +00:00
Karl Hudgell
475466617d update message 2023-08-08 15:44:12 +01:00
Karl Hudgell
02fa241ec6 fix for single episodes 2023-08-08 15:42:53 +01:00
3b599893bc
Merge pull request #16 from karl0ss/latestUpdates
Latest updates
2023-08-06 16:51:42 +01:00
664f5f4974
Merge branch 'master' into latestUpdates 2023-08-06 16:51:36 +01:00
Karl Hudgell
62712a3897 latest commit 2023-08-06 16:48:07 +01:00
Karl Hudgell
d865913154 latest update 2023-08-06 16:48:00 +01:00
2fc41cfa56
Merge pull request #12 from Arctic4161/master
Fix Backend.py
2023-05-23 17:20:59 +01:00
Arctic4161
5211c127e4
Merge pull request #3 from karl0ss/master
Update Fork
2022-11-21 22:16:45 -06:00
Arctic4161
fd1046f8a7
Update backend.py 2022-11-21 22:11:05 -06:00
Arctic4161
5a2d682cae
Merge pull request #1 from karl0ss/master
update my fork
2022-06-06 22:19:45 -05:00
7 changed files with 74 additions and 28 deletions

3
CLIOutput/eng.bat Normal file
View File

@ -0,0 +1,3 @@
for /R %%a in ("*.mp4") do MP4Box -lang eng "%%a"
exit

View File

@ -16,7 +16,7 @@ except AttributeError:
def gogodownloader(config): def gogodownloader(config):
CURRENT_DOMAIN = config["CurrentGoGoAnimeDomain"] CURRENT_URL = config["CurrentGoGoAnimeURL"]
os.system("cls" if os.name == "nt" else "clear") os.system("cls" if os.name == "nt" else "clear")
while True: while True:
print( print(
@ -45,7 +45,7 @@ def gogodownloader(config):
title = name.replace("-", " ").title().strip() title = name.replace("-", " ").title().strip()
else: else:
title = name.title().strip() 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: with requests.get(source) as res:
if res.status_code == 200: if res.status_code == 200:
soup = BeautifulSoup(res.content, "html.parser") soup = BeautifulSoup(res.content, "html.parser")
@ -110,9 +110,9 @@ def gogodownloader(config):
CustomMessage( CustomMessage(
f"{ERR}episode_start or episode_end cannot be more than {all_episodes}" f"{ERR}episode_start or episode_end cannot be more than {all_episodes}"
).print_error() ).print_error()
elif episode_end <= episode_start: elif episode_end < episode_start:
CustomMessage( CustomMessage(
f"{ERR}episode_end cannot be less than or equal to episode_start" f"{ERR}episode_end cannot be less than episode_start"
).print_error() ).print_error()
else: else:
break break
@ -139,7 +139,7 @@ def gogodownloader(config):
title, title,
) )
gogo.user_logged_in_check() gogo.user_logged_in_check()
source = f"https://gogoanime.{CURRENT_DOMAIN}/{name}" source = f"https://{CURRENT_URL}/{name}"
with requests.get(source) as res: with requests.get(source) as res:
soup = BeautifulSoup(res.content, "html.parser") soup = BeautifulSoup(res.content, "html.parser")
episode_zero = soup.find("h1", {"class": "entry-title"}) # value: 404 episode_zero = soup.find("h1", {"class": "entry-title"}) # value: 404

40
GoGoDownloaderCLI.spec Normal file
View 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 )

View File

@ -18,7 +18,7 @@
GoGo Downloader is based on the now broken **BitAnime**. I have had to rework quite a bit of the code to get it working again, and have ideas for some other improvements, I don't want to mess with the original codebase too much, hence **GoGo Downloader**. GoGo Downloader is based on the now broken **BitAnime**. I have had to rework quite a bit of the code to get it working again, and have ideas for some other improvements, I don't want to mess with the original codebase too much, hence **GoGo Downloader**.
**GoGo Downloader** gets its content from [gogoanime](https://gogoanime.film/). If you get a **404** error, please look up the correct anime name on [gogoanime](https://gogoanime.film/). The application will let you download all the episodes, or you can choose how many episodes you want to download. **GoGo Downloader** gets its content from [gogoanime](http://gogoanime3.net). If you get a **404** error, please look up the correct anime name on [gogoanime](http://gogoanime3.net). The application will let you download all the episodes, or you can choose how many episodes you want to download.
GoGo Anime has changed the way they show download links, and this no longer works via BS4, as the recaptcha blocks the links, but if you are logged in, there are other routes to get to download links, I have taken one of these routes to restore the application. GoGo Anime has changed the way they show download links, and this no longer works via BS4, as the recaptcha blocks the links, but if you are logged in, there are other routes to get to download links, I have taken one of these routes to restore the application.
@ -57,19 +57,19 @@ If you want to run from source, or are using Linux/Mac you can run directly from
## Usage ## Usage
The anime name is separated by "-". You can either type it manually, or go to [gogoanime.gg](https://gogoanime.gg/) and search for the anime you want to download and copy the name from the URL. The anime name is separated by "-". You can either type it manually, or go to [gogoanime.gg](https://gogoanime3.gg/) and search for the anime you want to download and copy the name from the URL.
### Examples ### Examples
##### One word title ##### One word title
- https://gogoanime.gg/category/bakemonogatari >> bakemonogatari - https://gogoanime3.gg/category/bakemonogatari >> bakemonogatari
- https://gogoanime.gg/category/steinsgate >> steinsgate - https://gogoanime3.gg/category/steinsgate >> steinsgate
##### Multiple word title ##### Multiple word title
- https://gogoanime.gg/category/shadows-house >> shadows-house - https://gogoanime3.gg/category/shadows-house >> shadows-house
- https://gogoanime.gg/category/kono-subarashii-sekai-ni-shukufuku-wo- >> kono-subarashii-sekai-ni-shukufuku-wo- - https://gogoanime3.gg/category/kono-subarashii-sekai-ni-shukufuku-wo- >> kono-subarashii-sekai-ni-shukufuku-wo-
# GoGoDownloader CLI # GoGoDownloader CLI

View File

@ -94,18 +94,18 @@ class gogoanime:
def get_gogoanime_auth_cookie(self): def get_gogoanime_auth_cookie(self):
session = requests.session() session = requests.session()
page = session.get( page = session.get(
f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/login.html" f"https://{self.config['CurrentGoGoAnimeURL']}/login.html"
) )
soup = BeautifulSoup(page.content, "html.parser") soup = BeautifulSoup(page.content, "html.parser")
meta_path = soup.select('meta[name="csrf-token"]') meta_path = soup.select('meta[name="csrf-token"]')
csrf_token = meta_path[0].attrs["content"] 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}" payload = f"email={self.config['GoGoAnime_Username']}&password={self.config['GoGoAnime_Password']}&_csrf={csrf_token}"
headers = { 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", "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", "authority": "gogo-cdn.com",
"referer": f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/", "referer": f"https://{self.config['CurrentGoGoAnimeURL']}/",
"content-type": "application/x-www-form-urlencoded", "content-type": "application/x-www-form-urlencoded",
} }
session.headers = headers session.headers = headers
@ -121,7 +121,7 @@ class gogoanime:
self, self,
): ):
page = requests.get( 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)), cookies=dict(auth=gogoanime.get_gogoanime_auth_cookie(self)),
) )
soup = BeautifulSoup(page.content, "html.parser") soup = BeautifulSoup(page.content, "html.parser")
@ -133,14 +133,14 @@ class gogoanime:
def get_links(self, source=None): def get_links(self, source=None):
if source is not 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 = [ episode_links = [
f"{source_ep}{i}" f"{source_ep}{i}"
for i in range(self.episode_start, self.episode_end + 1) for i in range(self.episode_start, self.episode_end + 1)
] ]
episode_links.insert(0, source) episode_links.insert(0, source)
else: else:
source_ep = f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/{self.name}-episode-" source_ep = f"https://{self.config['CurrentGoGoAnimeURL']}/{self.name}-episode-"
episode_links = [ episode_links = [
f"{source_ep}{i}" f"{source_ep}{i}"
for i in range(self.episode_start, self.episode_end + 1) for i in range(self.episode_start, self.episode_end + 1)
@ -197,7 +197,7 @@ class gogoanime:
("authority", "gogo-cdn.com"), ("authority", "gogo-cdn.com"),
( (
"referer", "referer",
f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/", f"https://{self.config['CurrentGoGoAnimeURL']}/",
), ),
] ]
), ),
@ -205,11 +205,13 @@ class gogoanime:
for link in file_list: for link in file_list:
if link is not None: if link is not None:
try:
dl.enqueue_file( dl.enqueue_file(
link, link,
path=f"./{self.title}", path=f"./{self.title}",
) )
except:
pass
files = dl.download() files = dl.download()
return files return files
@ -218,7 +220,7 @@ class gogoanime:
bookmarkList = [] bookmarkList = []
a = dict(auth=gogoanime.get_gogoanime_auth_cookie(self)) a = dict(auth=gogoanime.get_gogoanime_auth_cookie(self))
resp = requests.get( resp = requests.get(
f"https://gogoanime.{self.config['CurrentGoGoAnimeDomain']}/user/bookmark", f"https://{self.config['CurrentGoGoAnimeURL']}/user/bookmark",
cookies=a, cookies=a,
) )
soup = BeautifulSoup(resp.text, "html.parser") soup = BeautifulSoup(resp.text, "html.parser")
@ -241,8 +243,8 @@ class gogoanime:
bookmarkList.append( bookmarkList.append(
{ {
"showName": animeName, "showName": animeName,
"latestEpisode": int(episodeNum), "latestEpisode": float(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: with open("bookmarkList.json", "w") as f:

View File

@ -2,7 +2,7 @@
"GoGoAnime_Username":"", "GoGoAnime_Username":"",
"GoGoAnime_Password":"", "GoGoAnime_Password":"",
"MaxConcurrentDownloads": 4, "MaxConcurrentDownloads": 4,
"CurrentGoGoAnimeDomain": "gg", "CurrentGoGoAnimeURL": "gogoanime3.net",
"OverwriteDownloads": 0, "OverwriteDownloads": 0,
"CLIQuality":"720", "CLIQuality":"720",
"CLIDownloadLocation": "CLIOutput", "CLIDownloadLocation": "CLIOutput",

1
winRun.bat Normal file
View File

@ -0,0 +1 @@
cd C:\Users\Karl.Hudgell\Documents\GoGoDownloader && venv\Scripts\activate && python GoGoDownloaderCLI.py