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

--cookies not outputting cookie when run via python script #9661

Closed
nadermx opened this issue Jun 1, 2016 · 1 comment
Closed

--cookies not outputting cookie when run via python script #9661

nadermx opened this issue Jun 1, 2016 · 1 comment
Labels

Comments

@nadermx
Copy link

@nadermx nadermx commented Jun 1, 2016

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.06.02. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2016.06.02

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

default: worker.get_video_no_cache(u'https://www.youtube.com/watch?v=Mo4cmTaEDIk') (9206f665-3e7b-4405-af5f-c41b42b6411f)
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.05.30.2
[debug] Python version 2.7.6 - Linux-3.16.0-72-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.18-6, avprobe 9.18-6, ffmpeg N-80026-g936751b, ffprobe N-80026-g936751b
[debug] Proxy map: {u'http': 'http://0.0.0.0', u'https': 'http://0.0.0.0'}
[youtube] Mo4cmTaEDIk: Downloading webpage
[youtube] Mo4cmTaEDIk: Downloading video info webpage
[youtube] Mo4cmTaEDIk: Extracting video information
[youtube] {22} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {43} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {18} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {5} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {36} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {17} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {137} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {248} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {136} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {247} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {135} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {244} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {134} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {243} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {133} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {242} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {160} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {278} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {140} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {171} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {249} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {250} signature length 40.43, html5 player en_US-vflAwQJsE
[youtube] {251} signature length 40.43, html5 player en_US-vflAwQJsE
WARNING: Your copy of avconv is outdated and unable to properly mux separate video and audio files, youtube-dl will download single file media. Update avconv to version 10-0 or newer to fix this

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):


Description of your issue, suggested solution and other information

I'm currently trying to simulate the download and get the cookie of the video. When I run this command via terminal it produces the cookie and works fine

youtube-dl -v -g --cookies cookie.txt "https://www.youtube.com/watch?v=5GTXaObrXr0"

But when I run it via a python script it does not produce the cookie and doesn't error out anything but still gives me the json.

        ydl = youtube_dl.YoutubeDL({'verbose': True, 'cookies': 'cookie.txt', 'dump-single-json': True})
        with ydl:
            result = ydl.extract_info(
                url,
                download=False # We just want to extract the info
            )
        if 'entries' in result:
            # Can be a playlist or a list of videos
            video = result['entries']
        else:
            # Just a video
            video = result

Any reason this wouldn't be producing the cookie?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 1, 2016

Because it's not cookies but cookiefile. Similarly it's dump_single_json and not dump-single-json.

@dstftw dstftw closed this Jun 1, 2016
@dstftw dstftw added the invalid label Jun 1, 2016
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.