mirror of
https://github.com/karl0ss/GoGoDownloader.git
synced 2025-04-26 11:39:22 +01:00
Update backend.py
This commit is contained in:
parent
9d4dc53961
commit
bda3ead826
@ -7,7 +7,6 @@ from bs4 import BeautifulSoup
|
||||
from dataclasses import dataclass
|
||||
from colorama import Fore
|
||||
from random import choice
|
||||
import time
|
||||
|
||||
|
||||
@dataclass(init=True)
|
||||
@ -102,11 +101,10 @@ class Download:
|
||||
def download_episodes(self, url):
|
||||
client = req.session()
|
||||
with client.get(url[1], headers=self.random_headers(), stream=True, timeout=10) as workingurl:
|
||||
time.sleep(1)
|
||||
episode_name = "EP." + url[0] + ".mp4"
|
||||
file_loc = os.path.join(self.folder, episode_name)
|
||||
with open(file_loc, "w+b") as file:
|
||||
shutil.copyfileobj(workingurl.raw, file)
|
||||
shutil.copyfileobj(workingurl.raw, file, 8192)
|
||||
|
||||
|
||||
@dataclass(init=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user