Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only downloads part of the stream #290

Open
dr50673 opened this issue Mar 28, 2021 · 0 comments
Open

Only downloads part of the stream #290

dr50673 opened this issue Mar 28, 2021 · 0 comments

Comments

@dr50673
Copy link

dr50673 commented Mar 28, 2021

I have an issue where I am trying to download the audio stream for a video. It starts to download, then it stops, says that it has finished when in reality it has only downloaded a few KB and has left it as a .m4a.part file. I have a txt file full of urls that I want to download and y program should work through them, downloading one after the other. It used to work a month or so back, then I got 403 and 404 errors so I switched to use pytube to get the list of URLs from my playlist rather than pafy

file = open("urls.txt","r")
def downloadplaylist():
    for i in range (0,5):
        vidurl = file.readline()
        print(vidurl)
        v = pafy.new(vidurl)
        audiostreams = v.audiostreams
        bestaudio = v.getbestaudio()
        bestaudio.download()
    print("Finished!")

Here is the output:

1,024.0 Bytes [0.05%] received. Rate: [ 143 KB/s]. ETA: [15 secs]

3,072.0 Bytes [0.14%] received. Rate: [ 61 KB/s]. ETA: [36 secs]

7,168.0 Bytes [0.32%] received. Rate: [ 132 KB/s]. ETA: [16 secs]

15,360.0 Bytes [0.68%] received. Rate: [ 253 KB/s]. ETA: [8 secs]

31,744.0 Bytes [1.40%] received. Rate: [ 435 KB/s]. ETA: [5 secs]

64,512.0 Bytes [2.84%] received. Rate: [ 785 KB/s]. ETA: [2 secs]

130,048.0 Bytes [5.72%] received. Rate: [1376 KB/s]. ETA: [1 secs]

261,120.0 Bytes [11.50%] received. Rate: [2422 KB/s]. ETA: [0 secs]

Finished!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant