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

Youtube upload_date not available #3844

Closed
Marsjanin opened this issue Sep 27, 2014 · 6 comments
Closed

Youtube upload_date not available #3844

Marsjanin opened this issue Sep 27, 2014 · 6 comments

Comments

@Marsjanin
Copy link

@Marsjanin Marsjanin commented Sep 27, 2014

Hello. Newest version of yt-dl cannot extract upload date from string %(upload_date)s. In result I get only NA text. Here comes --verbose output:

$ youtube-dl --verbose http://youtu.be/l56K8eAtCig[debug] System config: []
[debug] User config: ['--write-description', '-u', u'<PRIVATE>', '-p', u'<PRIVATE>', '-o', '%(uploader_id)s .%(upload_date)s. %(title)s .%(id)s.%(ext)s', '-f', '22/18']
[debug] Command-line args: ['--verbose', 'http://youtu.be/l56K8eAtCig']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.09.25
[debug] Python version 2.7.5+ - Linux-3.11-2-amd64-x86_64-with-LinuxMint-1-debian
[debug] Proxy map: {}
[youtube] Setting language
[youtube] Downloading login page
[youtube] Logging in
[youtube] Confirming age
[youtube] l56K8eAtCig: Downloading webpage
[youtube] l56K8eAtCig: Downloading video info webpage
[youtube] l56K8eAtCig: Extracting video information
WARNING: unable to extract categories; please report this issue on http://yt-dl.org/bug
[info] Writing video description to: barcroftmedia .NA. Caught On Camera - Snake Devours Crocodile After 5 Hour Battle .l56K8eAtCig.mp4.description
[debug] Invoking downloader on u'https://r5---sn-2apm-f5fz.googlevideo.com/videoplayback?fexp=901490%2C927622%2C930666%2C931983%2C932404%2C934030%2C934931%2C935671%2C944600%2C945066%2C945403%2C946023%2C947209%2C952302%2C953801&ipbits=0&upn=F0uzySPSw9c&expire=1411877550&source=youtube&sparams=id%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&key=yt5&signature=E8FD8E9592B9617C2681D6C25972BC01E81C6EC6.CDEE433D0B7658BE3CF292CEABEA8FD4EAF499BC&ms=au&mt=1411855908&ratebypass=yes&mv=m&ip=46.113.107.18&itag=22&initcwndbps=808750&id=o-AJFe-VQssRi9vY0-_HUqFQp_TZRlnBoHYyAZttYVa4Sd&requiressl=yes&mm=31&sver=3'
[download] Destination: barcroftmedia .NA. Caught On Camera - Snake Devours Crocodile After 5 Hour Battle .l56K8eAtCig.mp4
[download] 100% of 17.71MiB in 00:38
@phihag
Copy link
Contributor

@phihag phihag commented Sep 28, 2014

Sorry, I cannot reproduce this; the detection works fine for me. Can you share the output you get when you add the --dump-intermediate-pages option (warning, will be large)?

@Marsjanin
Copy link
Author

@Marsjanin Marsjanin commented Sep 28, 2014

Hey, look what just happened.

Sorry for not pasting output for this moment, but I ran the command with dump intermediate pages option, it gives me a bunch of binary output, then I thought I better hide my login data before I paste that to any pastebin, so i removed options -u and -p from config file and run the command again, and then finally… the date appeared in the string as it should.

I use plain text e-mail as user and alfanumeric password without any special characters. I just checked now to be sure, it works via youtube's www. Where could there be the hook? Did You try reproducing the problem with valid user account data?

@phihag
Copy link
Contributor

@phihag phihag commented Sep 28, 2014

Sure, I used a valid login to reproduce. It still works perfectly fine.

If you want to look at the data yourself, just decode it; it should be base64, and not contain any passwords. It's also not binary, but straight UTF-8.

Sorry, but without any more detailed output, we are unable to diagnose this problem. We'll just have to wait for someone to reproduce and report the problem with the detailed outputs.

@phihag phihag closed this Sep 28, 2014
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 28, 2014

I can reproduce the problem when using my account, the problem is that it seems to get localized (to Spanish in my case), so the upload date part for our test video is:

<p id="watch-uploader-info">
    <strong class="watch-time-text">Publicado el 2/10/2012</strong>
</p>

Instead of the en_US version:

<p id="watch-uploader-info">
    <strong class="watch-time-text">Published on Oct 2, 2012</strong>
</p>

The same happens for categories (as in #3824), I get:

<h4 class="title">
    Categoría
</h4>
<ul class="content watch-info-tag-list">
    <li><a href="/science" class=" yt-uix-sessionlink     spf-link " data-sessionlink="ei=RIQoVMPoOsKb0wWG1IGABA">Ciencia y tecnología</a></li>
</ul>

I think we should either force the en_US locale or try recognizing the localized versions (having the categories translated is nice, but the date could be in any format).

@phihag
Copy link
Contributor

@phihag phihag commented Sep 29, 2014

Fixed in youtube-dl 2014.09.29.1 (by setting the language to English). Type youtube-dl -U to update.

@Marsjanin
Copy link
Author

@Marsjanin Marsjanin commented Sep 29, 2014

Yes, I can confirm that was also my problem. I tried type LANG=C or LANG=en_US.UTF-8 before youtube-dl but that did not the trick. The update did it, thank You for quick reaction.

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
3 participants
You can’t perform that action at this time.