Skip to content

Commit

Permalink
1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanBindez committed Oct 4, 2023
1 parent d789163 commit 7b96590
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.4-rc1
current_version = 1.4.1
commit = True
tag = True

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
----------
## usage:

### mp4 video download highest resolution:

```python

from pytubefix import YouTube
Expand All @@ -31,7 +33,7 @@ ys.download()

----------

### If you want to save in .mp3 just pass the mp3=True parameter (note the real audio compression format is MP4A), the file is just renamed to .mp3 so that it is recognized by any app:
### If you want to save in .mp3 just pass the mp3=True parameter (MPEG-4 AAC audio codec):


```python
Expand All @@ -44,7 +46,7 @@ url = input("URL >")
yt = YouTube(url, on_progress_callback = on_progress)
print(yt.title)

ys = yt.streams.get_audio_only() # use this method -> get_audio_only()
ys = yt.streams.get_audio_only()
ys.download(mp3=True) # pass the parameter mp3=True to save in .mp3
```

Expand Down
4 changes: 2 additions & 2 deletions pytubefix/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,11 @@ def title(self) -> str:
:rtype: str
"""
self._author = self.vid_info.get("videoDetails", {}).get(
"author", "unknown"
"author", "author"
)

if self._title:
return self._author + " - " + self._title
return self._title

try:
self._title = self.vid_info['videoDetails']['title'] #+ self._author
Expand Down
2 changes: 1 addition & 1 deletion pytubefix/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.4-rc1"
__version__ = "1.4.1"

if __name__ == "__main__":
print(__version__)
13 changes: 8 additions & 5 deletions test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from pytubefix import YouTube
from pytubefix.cli import on_progress


yt = YouTube('http://youtube.com/watch?v=2lAe1cqCOXo')

caption = yt.captions.get_by_language_code('en')
caption.save_captions("captions.txt")
url = input("URL >")

yt = YouTube(url, on_progress_callback = on_progress)
print(yt.title)

ys = yt.streams.get_audio_only()
ys.download(mp3=True)

0 comments on commit 7b96590

Please sign in to comment.