Sign in to follow this  
Followers 0
ironmankho

getting youtube video tag question

15 posts in this topic

#1 ·  Posted (edited)

I working on youtube project .where i need " youtube video tag"

therefor i am looking help .i also already read _IE UDF but little bit confuses to what i use

video URL

http://www.youtube.com/watch?v=aaLpiZJj6_Q

i required this data pic (a)

Posted Image

pic (a)

i Analysis above link via DebugBar v5.11 and find this result

Posted Image

from above it is very clear if i want tag than i must read this object DIV id=watch-video-tags class=floatL and all it links one by one

now big question for me what function of IE should use

Any help related this will be appreciate........................

Edited by ironmankho

Share this post


Link to post
Share on other sites



I working on youtube project .where i need " youtube video tag"

therefor i am looking help .i also already read _IE UDF but little bit confuses to what i use

video URL

http://www.youtube.com/watch?v=aaLpiZJj6_Q

i required this data pic (a)

Posted Image

pic (a)

i Analysis above link via DebugBar v5.11 and find this result

Posted Image

from above it is very clear if i want tag than i must read this object DIV id=watch-video-tags class=floatL and all it links one by one

now big question for me what function of IE should use

Any help related this will be appreciate........................

i am been researching this is i want to pull the VIDEO DETAILS info.. You need to looks at the YOUTUBE API as basically it shows how to pull the info from the .xml file on the video..

here is an example of a video file id and just have a small php that uses the YOUTUBE api and returns the info...

http://www.subfighter.tv/tmp/gdata.php

there are more variables you can add and lot of stuff that can be done with api with searches etc..

here is another small example i got the api to do a search and return the video to your page..

http://www.subfighter.tv/tmp/search.php

i want to be able to batch upload videos to my site..

but was looking at making an application from autoit to do it. at least for me to understand how it works... there is an XML DOM MODE.au3 for autoit that i would have to use..

also i have to look into connecting to my external DATABASE to upload all the info

the examples i found on the forum seemed to webscrape the page.. similiar to what your doing ... which is what i do not want to do...

so if anyone interested helping make this let me know.. as i need help getting it done...

Share this post


Link to post
Share on other sites

basically here the start and how to return the values of a VIDEO file from youtube.. just change the ID at the end to whatever video you want and it will return the a .xml file which you need to parse to get the values.. click the link below and if it says to download just select to open with internet explorer or firefox and you can see all the values returned.

http://gdata.youtube.com/feeds/api/videos/gZQQnFejH_I

now you go from there

like you can pull all the videos from an author here is my youtube account and you can see all my videos

http://gdata.youtube.com/feeds/videos?author=subfightercom

or by search words

http://gdata.youtube.com/feeds/api/videos/-/brabo

these are the basics.. and go from there as there is lot more things to be done.

if anyone knows of any scripts of someone using the YOUTUBE API with AUTOIT please post a link as i found nothing..

but a lot stuff could be done.. cool stuff..

just change the values above and see what you come up with..

Share this post


Link to post
Share on other sites

basic question .how it is possible to get TAG INFO ???

Share this post


Link to post
Share on other sites

basic question .how it is possible to get TAG INFO ???

well try to pull with XML as i am trying to get help here

http://www.autoitscript.com/forum/index.ph...mp;#entry597282

or there is

or webscrape and grab from the webpage.. load the youtube video page you want.. and view the source

<meta name="keywords" content="wec, martial, arts, cagefighting, fight, faber, brown, extreme">

has all the keywords you want

here is example script someone made that you can use to do it..

http://www.autoitscript.com/forum/index.ph...&hl=youtube

Share this post


Link to post
Share on other sites

i already searched .nothing new 0% help full. you have idea that i discuses above ?

Share this post


Link to post
Share on other sites

CODE
Func _Youtube_GetKeywords($sPlayer)

$sSource = $sPlayer

$iPlayerLinkStart = StringInStr($sSource,'<meta name="keywords" content=')

If Not $iPlayerLinkStart Then Return ""

$sBeforePlayerLink = StringLeft($sSource,$iPlayerLinkStart+StringLen('<meta name="keywords" content=')-1)

If Not $sBeforePlayerLink Then Return ""

$aSplit = StringSplit($sBeforePlayerLink,@CRLF)

$iPlayerLinkLine = $aSplit[0]

If Not $iPlayerLinkLine Then Return ""

$aSourceSplit = StringSplit($sSource,@CRLF)

If $iPlayerLinkLine > $aSourceSplit[0] Then Return ""

$sPlayerLinkLine = $aSourceSplit[$iPlayerLinkLine]

$iPlayerLinkStart = StringInStr($sPlayerLinkLine,'<meta name="keywords" content=')

$sAfterPlayerLink = StringTrimLeft($sPlayerLinkLine,$iPlayerLinkStart+StringLen('<meta name="keywords" content=')-1)

$sAfterPlayerLink = StringTrimRight($sAfterPlayerLink,2)

$sAfterPlayerLink = StringTrimLeft($sAfterPlayerLink,1)

Return $sAfterPlayerLink

EndFunc

the last link i showed you can do what you want.. and example works and pulls what you need..

you just have to implement it.. but i just tested the example and works fine.. and gets the keywords in from autoit. now is what do you want to do with the keywords.. save them etc..

thats your job... to do

so your solution is there

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Thanks it works :P

Edited by ironmankho

Share this post


Link to post
Share on other sites

good.. what are you making anyways... why you need the keywords.. where are saving them?

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

actually i am creating a website where i will index youtube videos

BTW you have idea SQL command

Edited by ironmankho

Share this post


Link to post
Share on other sites

actually i am creating a website where i will index youtube videos

BTW you have idea SQL command

you have your site up.. would like to see it...

well i new to autoscript so i am learning... but you could either have a it write or add what your doing to an .sql file and run it in myphpadmin or something along those lines.. navicat is a cool program i use as you can connect and manage your MYSQL server from windows

or you can try to do this in autoit.. as i think you can connect to your external database... but research it.

Share this post


Link to post
Share on other sites

I working on youtube project .where i need " youtube video tag"

therefor i am looking help .i also already read _IE UDF but little bit confuses to what i use

video URL

http://www.youtube.com/watch?v=aaLpiZJj6_Q

i required this data pic (a)

Posted Image

pic (a)

i Analysis above link via DebugBar v5.11 and find this result

Posted Image

from above it is very clear if i want tag than i must read this object DIV id=watch-video-tags class=floatL and all it links one by one

now big question for me what function of IE should use

Any help related this will be appreciate........................

Another approach:

$oDiv = _IEGetObjById($oIE, "watch-video-tags")
$oAs = _IETagnameGetCollection($oDiv, "a")
For $oA in $oAs
    ConsoleWrite("InnerText: " & _IEPropertyGet($oA, "innertext") & " Href: " & $oA.href & @CRLF)
Next

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

you have your site up.. would like to see it...

well i new to autoscript so i am learning... but you could either have a it write or add what your doing to an .sql file and run it in myphpadmin or something along those lines.. navicat is a cool program i use as you can connect and manage your MYSQL server from windows

or you can try to do this in autoit.. as i think you can connect to your external database... but research it.

i am working on it . as soon it will complete i will PM you

Share this post


Link to post
Share on other sites

why dont use '_INetGetSource ' ?

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

why dont use '_INetGetSource ' ?

i think it is also good but retrieving required data will take more code

Edited by ironmankho

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0