Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nichind committed Nov 20, 2024
1 parent ab67532 commit 10391aa
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
<h4>Install pybalt using PowerShell on Windows</h4>

Downloads [install.bat](./install.bat) and executes it.

Powershell should be run as administrator, otherwise aliases (`cobalt`, `pybalt`) in terminal will not work.

```powershell
powershell -Command "Invoke-WebRequest -Uri https://raw.githubusercontent.com/nichind/pybalt/main/install.bat -OutFile install.bat; .\install.bat"
```
Expand Down
4 changes: 1 addition & 3 deletions install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ python -m pip install --upgrade pip

python -m pip install pybalt -U


pause

pause
11 changes: 10 additions & 1 deletion pybalt/cobalt.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(
- downloaded (bool): Whether the file has been downloaded.
- path (str): The path where the file is saved.
"""
self.cobalt = cobalt
self.cobalt = cobalt if cobalt else Cobalt()
self.status = status
self.url = url
self.tunnel = tunnel
Expand Down Expand Up @@ -90,6 +90,15 @@ def __repr__(self):
return "<Media " + (self.path if self.path else f'"{self.filename}"') + ">"


class DownloadedFile(File):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.downloaded = True

def __repr__(self):
return "<File " + (self.path if self.path else f'"{self.filename}"') + ">"


class Cobalt:
def __init__(
self, api_instance: str = None, api_key: str = None, headers: dict = None
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ def readme():

setup(
name="pybalt",
version="2024.11.15",
version="2024.11.16",
author="nichind",
author_email="[email protected]",
description="Download mediafiles from YouTube, Twitter (X), Instagram, Reddit & more. CLI wrapper and python module for @imputnet's cobalt processing instance api.",
description="Download mediafiles from YouTube, Twitter (X), Instagram, Reddit & more. CLI & python module for @imputnet's cobalt processing instance api.",
long_description=readme(),
long_description_content_type="text/markdown",
url="https://github.com/nichind/pybalt",
Expand All @@ -22,6 +22,7 @@ def readme():
"pytube",
"python-dotenv",
],
keywords=['downloader', 'cobalt', 'cobalt-cli', 'youtube', 'twitter', 'x', 'instagram', 'reddit', 'twitch', 'bilibili', 'download', 'youtube-downloader', 'twitter-downloader'],
classifiers=[
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
Expand Down

0 comments on commit 10391aa

Please sign in to comment.