Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By mudanoman on
Hello,
I would like to try to add automatic youtube thumbnailing for the video module when a user submits a youtube video. I am stuck on how to parse the thumbnail url (
URL) in the XML file. Here is an example of the xml file: http://www.youtube.com/api2_rest?method=youtube.videos.get_details&dev_i... . There seems like there are multiple ways to do this, but what is the most effective assuming I just want to extract just the thumbnail url from the xml file. Any help much appreciated.
TIA,
Ivan
Comments
You don't have to parse the
You don't have to parse the whole XML. Just find the position of <thumbnail_url> and </thumbnail_url>. So you can get the URL by using substr function.
You can also use Regular Expression. RegExp has less code but it may be slower.
--------------------------------------------------------------
http://erdemkose.com/
Thank you!
Thank you!
This is what i'm after!
Can anyone point out how to get this to work? Where do I place the code that erdemkose has suggested?
Thanks for any help.
My new EasySnoozing, Nursing and BusinessEgghead websites on D7!
I am searching for this
I am searching for this feature too. Can you please share your hack?
Also looking for this, can
Also looking for this, can you please share how you did it, thanks.