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

Weird cookies file rewrite behavior. #22069

Closed
Duoquote opened this issue Aug 11, 2019 · 1 comment
Closed

Weird cookies file rewrite behavior. #22069

Duoquote opened this issue Aug 11, 2019 · 1 comment
Labels

Comments

@Duoquote
Copy link

@Duoquote Duoquote commented Aug 11, 2019

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2019.08.02
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

duoqu@DESKTOP-VDD1FLJ MINGW64 ~
$ youtube-dl "https://www.youtube.com/watch?v=urSpCj7dK_I" --cookies cookies.txt -F --verbose                                                                                               [debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.youtube.com/watch?v=urSpCj7dK_I', '--cookies', 'cookies.txt', '-F', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2019.08.02
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: ffmpeg 4.1.3, ffprobe 4.1.3
[debug] Proxy map: {}
[youtube] urSpCj7dK_I: Downloading webpage
[youtube] urSpCj7dK_I: Downloading video info webpage
[youtube] {22} signature length 109, html5 player vfl0ft1-Z
[youtube] {18} signature length 109, html5 player vfl0ft1-Z
[youtube] {313} signature length 109, html5 player vfl0ft1-Z
[youtube] {271} signature length 105, html5 player vfl0ft1-Z
[youtube] {137} signature length 109, html5 player vfl0ft1-Z
[youtube] {248} signature length 109, html5 player vfl0ft1-Z
[youtube] {136} signature length 109, html5 player vfl0ft1-Z
[youtube] {247} signature length 109, html5 player vfl0ft1-Z
[youtube] {135} signature length 109, html5 player vfl0ft1-Z
[youtube] {244} signature length 109, html5 player vfl0ft1-Z
[youtube] {134} signature length 105, html5 player vfl0ft1-Z
[youtube] {243} signature length 109, html5 player vfl0ft1-Z
[youtube] {133} signature length 109, html5 player vfl0ft1-Z
[youtube] {242} signature length 109, html5 player vfl0ft1-Z
[youtube] {160} signature length 105, html5 player vfl0ft1-Z
[youtube] {278} signature length 105, html5 player vfl0ft1-Z
[youtube] {140} signature length 109, html5 player vfl0ft1-Z
[youtube] {249} signature length 109, html5 player vfl0ft1-Z
[youtube] {250} signature length 105, html5 player vfl0ft1-Z
[youtube] {251} signature length 105, html5 player vfl0ft1-Z
[youtube] {256} signature length 109, html5 player vfl0ft1-Z
[youtube] {258} signature length 105, html5 player vfl0ft1-Z
[info] Available formats for urSpCj7dK_I:
format code  extension  resolution note
249          webm       audio only DASH audio   57k , opus @ 50k, 1.14MiB
250          webm       audio only DASH audio   74k , opus @ 70k, 1.48MiB
140          m4a        audio only DASH audio  130k , m4a_dash container, mp4a.40.2@128k, 2.97MiB
251          webm       audio only DASH audio  148k , opus @160k, 2.91MiB
256          m4a        audio only DASH audio  194k , m4a_dash container, mp4a.40.5, 4.46MiB
258          m4a        audio only DASH audio  386k , m4a_dash container, mp4a.40.2, 8.85MiB
278          webm       256x144    144p  103k , webm container, vp9, 24fps, video only, 1.83MiB
160          mp4        256x144    144p  118k , avc1.4d400c, 24fps, video only, 2.52MiB
242          webm       426x240    240p  191k , vp9, 24fps, video only, 2.56MiB
133          mp4        426x240    240p  262k , avc1.4d4015, 24fps, video only, 5.55MiB
243          webm       640x360    360p  310k , vp9, 24fps, video only, 5.57MiB
134          mp4        640x360    360p  630k , avc1.4d401e, 24fps, video only, 6.65MiB
244          webm       854x480    480p  655k , vp9, 24fps, video only, 11.83MiB
135          mp4        854x480    480p 1152k , avc1.4d401e, 24fps, video only, 13.77MiB
247          webm       1280x720   720p 1415k , vp9, 24fps, video only, 24.86MiB
136          mp4        1280x720   720p 2314k , avc1.4d401f, 24fps, video only, 27.45MiB
248          webm       1920x1080  1080p 2509k , vp9, 24fps, video only, 45.52MiB
137          mp4        1920x1080  1080p 3878k , avc1.640028, 24fps, video only, 54.52MiB
271          webm       2560x1440  1440p 6414k , vp9, 24fps, video only, 122.32MiB
313          webm       3840x2160  2160p 12645k , vp9, 24fps, video only, 250.97MiB
18           mp4        640x360    medium  394k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 9.06MiB
22           mp4        1280x720   hd720 1253k , avc1.64001F, mp4a.40.2@192k (44100Hz) (best)
Traceback (most recent call last):
  File "__main__.py", line 19, in 
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwvl_v2x\build\youtube_dl\__init__.py", line 474, in main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwvl_v2x\build\youtube_dl\__init__.py", line 467, in _real_main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwvl_v2x\build\youtube_dl\YoutubeDL.py", line 565, in __exit__
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwvl_v2x\build\youtube_dl\utils.py", line 2736, in save
  File "C:\Python\Python34\lib\http\cookiejar.py", line 2068, in save
PermissionError: [Errno 13] Permission denied: 'cookies.txt'

Description

After an error or after listing formats, youtube-dl tries to rewrite the cookies.txt and if succeeds, leaves an empty cookies.txt file behind. I made the file read-only so just shows an error, not a huge bug but worth to mention I guess. And also there is nothing to do with git bash, behavior happens in windows cmd too. Maybe associated with choco installation of youtube-dl.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 12, 2019

This is expected behavior.

@dstftw dstftw closed this Aug 12, 2019
@dstftw dstftw added the invalid label Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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