get filesize #132

Closed
opened 2026-02-20 22:26:10 -05:00 by deekerman · 7 comments
Owner

Originally created by @samrat on GitHub (Oct 9, 2011).

Since the file size is known before the download completes, an option could be added to find the filesize similar to --get-filename.

Originally created by @samrat on GitHub (Oct 9, 2011). Since the file size is known before the download completes, an option could be added to find the filesize similar to --get-filename.
deekerman 2026-02-20 22:26:10 -05:00
  • closed this issue
  • added the
    request
    label
Author
Owner

@phihag commented on GitHub (Oct 10, 2011):

While the filesize is known while downloading, it is generally not known before downloading. We'll need to send a HEAD request in these cases then.

@phihag commented on GitHub (Oct 10, 2011): While the filesize is known _while_ downloading, it is generally not known _before_ downloading. We'll need to send a `HEAD` request in these cases then.
Author
Owner

@samrat commented on GitHub (Oct 11, 2011):

@phihag - Can I find the filesize without downloading then? Could you please show me how to do it? I really need this.

@samrat commented on GitHub (Oct 11, 2011): @phihag - Can I find the filesize without downloading then? Could you please show me how to do it? I really need this.
Author
Owner

@sivaramn commented on GitHub (Nov 18, 2011):

Second the feature request for --get-filesize option. In lots of places in the developing world, bandwidth is throttled after the first 5Gb/10Gb etc, it would make sense to check the file one's downloading before fetching.

Right, I understand that there's a technical issue that you'd have to initiate the download before getting to know the file size but still, it would be an option that the user can try at his own risk.

and is there a possibility of --random-wait like wget? That would help in not getting banned accidently. :-)

@sivaramn commented on GitHub (Nov 18, 2011): Second the feature request for --get-filesize option. In lots of places in the developing world, bandwidth is throttled after the first 5Gb/10Gb etc, it would make sense to check the file one's downloading before fetching. Right, I understand that there's a technical issue that you'd have to initiate the download before getting to know the file size but still, it would be an option that the user can try at his own risk. and is there a possibility of --random-wait like wget? That would help in not getting banned accidently. :-)
Author
Owner

@yasoob commented on GitHub (Jul 8, 2013):

@samrat check out this gist https://gist.github.com/yasoob/9f5528b97dd4522b48e4 I have outlined a method. There is another method as well if you need it then i will upload it as well. But keep in mind that currently it is possible only for http or https videos not for rtmp. :)

@yasoob commented on GitHub (Jul 8, 2013): @samrat check out this gist https://gist.github.com/yasoob/9f5528b97dd4522b48e4 I have outlined a method. There is another method as well if you need it then i will upload it as well. But keep in mind that currently it is possible only for http or https videos not for rtmp. :)
Author
Owner

@shirishag75 commented on GitHub (Aug 30, 2013):

interested in it as well hence commenting.

@shirishag75 commented on GitHub (Aug 30, 2013): interested in it as well hence commenting.
Author
Owner

@xanadu commented on GitHub (Aug 30, 2013):

You guys will find out a lot of sites are not friendly with HEAD request.

@xanadu commented on GitHub (Aug 30, 2013): You guys will find out a lot of sites are not friendly with HEAD request.
Author
Owner

@ghost commented on GitHub (Jun 18, 2014):

Same as #6.

@ghost commented on GitHub (Jun 18, 2014): Same as #6.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#132
No description provided.