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

instagram: filenames are too long #5740

Closed
pabs3 opened this issue May 18, 2015 · 6 comments
Closed

instagram: filenames are too long #5740

pabs3 opened this issue May 18, 2015 · 6 comments

Comments

@pabs3
Copy link

@pabs3 pabs3 commented May 18, 2015

$ youtube-dl --verbose http://instagram.com/schekobon/
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://instagram.com/schekobon/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.02.28
[debug] Python version 2.7.10rc1 - Linux-4.0.0-1-amd64-x86_64-with-debian-stretch-sid
[debug] exe versions: avconv 11.3-6, avprobe 11.3-6, rtmpdump 2.4
[debug] Proxy map: {}
[instagram:user] schekobon: Downloading page 1 
[instagram:user] schekobon: Downloading page 2 
[instagram:user] schekobon: Downloading page 3 
[instagram:user] schekobon: Downloading page 4 
[instagram:user] schekobon: Downloading page 5 
[instagram:user] schekobon: Downloading page 6 
[instagram:user] schekobon: Downloading page 7 
[instagram:user] schekobon: Downloading page 8 
[instagram:user] schekobon: Downloading page 9 
[instagram:user] schekobon: Downloading page 10 
[instagram:user] schekobon: Downloading page 11 
[instagram:user] schekobon: Downloading page 12 
[download] Downloading playlist: schekobon
[instagram:user] playlist schekobon: Collected 14 video ids (downloading 14 of them)
[download] Downloading video 1 of 14
[debug] Invoking downloader on u'https://scontent-lax.cdninstagram.com/hphotos-xfa1/t50.2886-16/11244209_893039364086936_414992731_n.mp4'
ERROR: unable to open for writing: [Errno 36] File name too long: 'Animation basics - timing and spasing , following arcs, tv paint 11 trial. Practice with a clock)))#art #animationbasics #animation #2danimation #study #clock #tvpaint #\xd1\x83\xd0\xbf\xd1\x80\xd0\xb0\xd0\xb6\xd0\xbd\xd0\xb5\xd0\xbd\xd0\xb8\xd1\x8f #\xd0\xb0\xd0\xbd\xd0\xb8\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f #\xd1\x87\xd0\xb0\xd1\x81\xd1\x8b ...-986928499285239423_1520751736.mp4.part'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/youtube_dl/downloader/http.py", line 158, in real_download
    (stream, tmpfilename) = sanitize_open(tmpfilename, open_mode)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/utils.py", line 264, in sanitize_open
    stream = open(encodeFilename(filename), open_mode)
IOError: [Errno 36] File name too long: 'Animation basics - timing and spasing , following arcs, tv paint 11 trial. Practice with a clock)))#art #animationbasics #animation #2danimation #study #clock #tvpaint #\xd1\x83\xd0\xbf\xd1\x80\xd0\xb0\xd0\xb6\xd0\xbd\xd0\xb5\xd0\xbd\xd0\xb8\xd1\x8f #\xd0\xb0\xd0\xbd\xd0\xb8\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f #\xd1\x87\xd0\xb0\xd1\x81\xd1\x8b ...-986928499285239423_1520751736.mp4.part'
@rrooij
Copy link
Contributor

@rrooij rrooij commented May 20, 2015

Does running youtube-dl with the argument --restrict-filenames resolve the issue?

@pabs3
Copy link
Author

@pabs3 pabs3 commented May 21, 2015

On Wed, 2015-05-20 at 12:18 -0700, rrooij wrote:

Does running youtube-dl with the argument --restrict-filenames resolve
the issue?

Yes. I wonder if it the default should be to use that when there are
filename related errors saving the file?

bye,
pabs

http://bonedaddy.net/pabs3/

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 7, 2015

I use a workaround that limits the title to 80 characters in e1ec933. In the next version these videos should be downloaded correctly.

@tone87
Copy link

@tone87 tone87 commented Apr 11, 2019

i have the same problem in last version(2019.04.07). for example on this video:
https://www.instagram.com/premoniticn/p/Bv1uMwin6BC/?utm_source=ig_share_sheet&igshid=s46ivg10w9oz

with output:
%(title)s-%(id)s.%(ext)s

@shirishag75
Copy link

@shirishag75 shirishag75 commented Aug 29, 2019

I had the same thing in -

~/Videos$ youtube-dl --verbose -c -f 22 7IqwZieFc2s
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'-c', u'-f', u'22', u'7IqwZieFc2s']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.08.13
[debug] Python version 2.7.16+ (CPython) - Linux-5.2.0-2-amd64-x86_64-with-debian-bullseye-sid
[debug] exe versions: ffmpeg 4.1.4-1, ffprobe 4.1.4-1, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] 7IqwZieFc2s: Downloading webpage
[youtube] 7IqwZieFc2s: Downloading video info webpage
[debug] Invoking downloader on u'https://r2---sn-cnoa-2o9e.googlevideo.com/videoplayback?expire=1567138647&ei=905oXfCAL76Ez7sPl9Oi0A0&ip=117.195.78.143&id=o-AEtPGMvEZJjU0ltpyFTkN0iarNs3Wf3lKlO5ZCLp4bSO&itag=22&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-cnoa-2o9e%2Csn-cvh76nes&ms=au%2Crdu&mv=m&mvi=1&pl=20&initcwndbps=148750&mime=video%2Fmp4&ratebypass=yes&dur=3150.251&lmt=1567060914639221&mt=1567117005&fvip=2&c=WEB&txp=2316222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cmime%2Cratebypass%2Cdur%2Clmt&sig=ALgxI2wwRgIhALiDgYXFWkM8qHakjwoaR6jfXA0dRRXuFI2zmSU3AMJTAiEA-XO8WmJka1pE1Rm9iR8-gQk944nrkMdhB7wRmI9XR0E%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRQIgBgadSVFSsy39mAq8-Qx7xZmSPh5Gr87GEVlB8yNRVbsCIQDDCEyaImwr0RcPpOuSsi-Otbb1aoybmI-sXj84DkhnzA%3D%3D'
ERROR: unable to open for writing: [Errno 36] File name too long: '\xe0\xa4\x95\xe0\xa4\xb6\xe0\xa5\x8d\xe0\xa4\xae\xe0\xa5\x80\xe0\xa4\xb0 \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\xaa\xe0\xa5\x88\xe0\xa4\xa6\xe0\xa4\xbe \xe0\xa4\xb9\xe0\xa5\x81\xe0\xa4\x88 \xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\xaa\xe0\xa5\x8b\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\x9f\xe0\xa4\xbf\xe0\xa4\x82\xe0\xa4\x97 \xe0\xa4\x95\xe0\xa5\x80 \xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa5\x8c\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa5\x8b\xe0\xa4\x82 \xe0\xa4\xaa\xe0\xa4\xb0 \xe0\xa4\xb5\xe0\xa4\xb9\xe0\xa4\xbe\xe0\xa4\x81  \xe0\xa4\xb8\xe0\xa5\x87 \xe0\xa4\xb2\xe0\xa5\x8c\xe0\xa4\x9f\xe0\xa5\x87 \xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\xaa\xe0\xa5\x8b\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\x9f\xe0\xa4\xb0\xe0\xa5\x8b\xe0\xa4\x82 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb8\xe0\xa4\xbe\xe0\xa4\xa5 \xe0\xa4\x97\xe0\xa5\x8b\xe0\xa4\xb2\xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x9c \xe0\xa4\x9a\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\x9a\xe0\xa4\xbe.-7IqwZieFc2s.mp4.part'
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 250, in download
    ctx.tmpfilename, ctx.open_mode)
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 2042, in sanitize_open
    stream = open(encodeFilename(filename), open_mode)
IOError: [Errno 36] File name too long: '\xe0\xa4\x95\xe0\xa4\xb6\xe0\xa5\x8d\xe0\xa4\xae\xe0\xa5\x80\xe0\xa4\xb0 \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\xaa\xe0\xa5\x88\xe0\xa4\xa6\xe0\xa4\xbe \xe0\xa4\xb9\xe0\xa5\x81\xe0\xa4\x88 \xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\xaa\xe0\xa5\x8b\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\x9f\xe0\xa4\xbf\xe0\xa4\x82\xe0\xa4\x97 \xe0\xa4\x95\xe0\xa5\x80 \xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa5\x8c\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa5\x8b\xe0\xa4\x82 \xe0\xa4\xaa\xe0\xa4\xb0 \xe0\xa4\xb5\xe0\xa4\xb9\xe0\xa4\xbe\xe0\xa4\x81  \xe0\xa4\xb8\xe0\xa5\x87 \xe0\xa4\xb2\xe0\xa5\x8c\xe0\xa4\x9f\xe0\xa5\x87 \xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\xaa\xe0\xa5\x8b\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\x9f\xe0\xa4\xb0\xe0\xa5\x8b\xe0\xa4\x82 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb8\xe0\xa4\xbe\xe0\xa4\xa5 \xe0\xa4\x97\xe0\xa5\x8b\xe0\xa4\xb2\xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x9c \xe0\xa4\x9a\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\x9a\xe0\xa4\xbe.-7IqwZieFc2s.mp4.part'

I did use the --restrict-filenames to restrict to only the youtubeid to restrict the name to and then it downloads.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Aug 30, 2019

i have the same problem in last version(2019.04.07). for example on this video:
https://www.instagram.com/premoniticn/p/Bv1uMwin6BC/?utm_source=ig_share_sheet&igshid=s46ivg10w9oz

This video can be downloaded via https://www.instagram.com/p/Bv1uMwin6BC/. You may want to open a new ticket for support of Instagram URLs with usernames.

I had the same thing in -

The issue is fixed in Instagram but not YouTube. Please move on to #5921 for further discussions.

@ytdl-org ytdl-org locked as resolved and limited conversation to collaborators Aug 30, 2019
@ytdl-org ytdl-org unlocked this conversation Aug 30, 2019
@ytdl-org ytdl-org locked as resolved and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.