#๐Ÿ”’ Help with YT video downloader project using Pytube library

20 messages ยท Page 1 of 1 (latest)

hollow bay
#

I can't figure out how to get the DASH high quality streams. I know I have to download audio and video streams separately and then use ffmpeg to merge them into one file.

pine briarBOT
#

@hollow bay

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

#

Hey @hollow bay!

It looks like you pasted Python code without syntax highlighting.

Please use syntax highlighting to improve the legibility of your code and make it easier for us to help you.

To do this, use the following method:
```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
You can **edit your original message** to correct your code block.
hollow bay
#
from pytubefix import YouTube
from pytubefix.cli import on_progress

def download_video(url):
    yt = YouTube(url, on_progress_callback = on_progress)
    print("Title: ", yt.title)
 
    yt.streams.filter(adaptive=True)
    yt.streams.order_by('resolution')
    yt.streams.desc()

    ys = yt.streams.first()
    ys.download(output_path=r"C:\Users\Saksham Vats\Desktop")


user_url = input("Enter the video URL: ")
download_video(user_url)
#

here's my code right now

#

how do i download the adaptive only video and only audio files separately?

pine briarBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

hollow bay
#

If I try to download my own video, is it really malicious?

tribal ember
#

Its against Youtube TOS

vestal trout
hollow bay
#

why stick up for YT though

vestal trout
#

Because python discord is a neutral entity that wishes to not have alphabet going after it for facilitating bad behavior

hollow bay
#

fair enough

#

I'll ask elsewhere

tribal ember
hollow bay
#

Good to know

#

!close

pine briarBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.