function scald_youtube_scald_add_form_fill() has code to "Prefill tags". However it does not import any tags over from Youtube to the Atom.

It is using Youtube's API to read the information about the video. But that API no longer provides information about tags, see: http://stackoverflow.com/questions/12501957/video-tags-no-longer-availab...

A possible workaround is to query the html that is sent to a user viewing a video, as this does still contain tags. eg if I look at
view-source:http://www.youtube.com/watch?v=JALnQvg_dUQ
I can see
<meta name="keywords" content="gwulo, old hong kong">

Comments

driki_’s picture

StatusFileSize
new1.09 KB

hereby a proposed patch, parsing HTML from youtube. I'd rather use another method, but there seems no other available.

driki_’s picture

Status: Active » Needs review

changing status :)

jcisio’s picture

Status: Needs review » Needs work

I replace $id by $info->id in the patch and it works. However there are still thousands of PHP warning.

Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity, line: 670 in scald_youtube_parse_item() (line 287 of /home/jcisio/workspace/www/galaxy/sites/all/modules/scald/modules/providers/scald_youtube/scald_youtube.module).
Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity, line: 670 in scald_youtube_parse_item() (line 287 of /home/jcisio/workspace/www/galaxy/sites/all/modules/scald/modules/providers/scald_youtube/scald_youtube.module).
Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity, line: 699 in scald_youtube_parse_item() (line 287 of /home/jcisio/workspace/www/galaxy/sites/all/modules/scald/modules/providers/scald_youtube/scald_youtube.module).
jcisio’s picture

Title: Youtube provider does not import tags » Youtube provider does not import tags and recognizes correctly video dimensions
Assigned: Unassigned » jcisio

I'm working on it.

jcisio’s picture

Status: Needs work » Needs review
StatusFileSize
new5.4 KB
jcisio’s picture

Status: Needs review » Active

Committed and pushed #5. Back to active because I'm working on tests.

  • Commit 429c3aa on 7.x-1.x by jcisio:
    Issue #2188415 by jcisio, drico | davidhk: Fixed Youtube provider does...

  • Commit 04d4044 on 7.x-1.x by jcisio:
    Issue #2188415 follow-up: avoid DomDocument warnings.
    
jcisio’s picture

Status: Active » Needs review
StatusFileSize
new2.13 KB

Now we have tests.

jcisio’s picture

Assigned: jcisio » Unassigned
Status: Needs review » Fixed

Committed and pushed #9.

  • Commit 468ec9c on 7.x-1.x by jcisio:
    Issue #2188415: Add tests for Scald YouTube
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.