SlideShare a Scribd company logo
Starting to Monkey Around
With Yahoo! Search Monkey
“You’ll never make a monkey out of me”
CEBIT Turkey 2008 – Éric Daspet
Original presentation by Neil Crosby (One of Yahoo!’s Monkeys in London)
Who Am I ?
Frontend engineer at Yahoo!
but not in the Search Monkey team
What is Search Monkey?
• A way to create more interesting Search
Results.
• Enhanced results and Infobar.
• Enhanced results fit a tight template, infobars
can be far more freeform.
Some Normal Search Results
Monkey Monkey Monkey!
Where does the data come from?
• Microformats
• RDFa
• Or pull it in from the page using XSLT
My First Monkey
• Start with something containing
microformats.
• FaceBook’s public profile pages fit the bill.
• We’ll build a monkey that shows the user’s
profile picture.
• Go to http://developer.search.yahoo.com/
Starting your Monkey – Basic Info
• Name
• Description
• Category (for gallery)
• Icon (really important)
• Don’t forget to agree to
the T&C
URLs
• Use auto-generate first.
• Then choose specific
URL for first field.
• First URL is used to
generate previews in
gallery.
Data Services
• We can ignore this for
now since we’re using
µformats that are built
into Search Monkey.
Appearance
• This is where we’ll
actually do some work.
• You must change
something from the
default here.
Using the right hand rail
• +/- expands/contracts
sections.
• Clicking an item pastes
that data into your PHP
at the cursor.
Making our changes
$ret['image']['src'] =
Data::get('com.yahoo.uf.hcard/rel:Card/vcard:photo/@r
esource');
• And that’s all there is to creating a simple
monkey!
Let others play with your monkey
• Once you’re happy with
your monkey, share it.
• Let users add your
monkey to their SERPs.
• Share your source if you
want to.
Monkey 2: Robotic Monkey of Doom
• We want a Flickr Monkey that:
– Shows main/first photo on a page.
– Includes relevant information about photo.
• No relevant µformats on the page, so we need
some XSLT.
• Will be slower than pre-spidered µFormats.
• We need to create a data service.
Creating the Data Service
• Starts the same as a µFormat Monkey does.
• Basic Info.
• URLs.
• Trigger: *.flickr.com/photos/*
• First test:
http://www.flickr.com/photos/thevoicewithin
/1276763134/
Now for some XSLT
• Scary, but not too scary
• Be aware of allowable rel values – see
documentation.
XSLT First Pass
• We want to extract an image URL and a
description.
• Assume the only page type is the single photo
page for now.
• Use Firebug and/or XPather in Firefox to work
out XPaths to our required nodes.
XSLT First Pass
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/">
<adjunctcontainer>
<adjunct id="smid:{$smid}" version="1.0">
<item rel="rel:Photo"
resource="{//div[@class='photoImgDiv']/img[@class='reflect']/@src}">
<meta property="dc:description">
<xsl:value-of select="//div[@class='photoDescription']"/>
</meta>
</item>
</adjunct>
</adjunctcontainer>
</xsl:template>
</xsl:stylesheet>
Save & Refresh
• Check that we don’t get any errors.
• Then, back to the homepage.
Making our Flickr Monkey
• Give it a name
• Trigger: *.flickr.com/photos/*
• First Test:
http://www.flickr.com/photos/thevoicewithin
/1276763134/
Flickr Monkey Data Services
• “Add More Data
Services”
• Because we’re using the
same URL trigger for
monkey and data
source, the source
shows up here
Flickr Monkey Appearance
• Point and click info from the data source.
$ret['summary'] =
Data::get('smid:DATA_SRC_ID/rel:Photo/dc:description'
);
$ret['image']['src'] =
Data::get('smid:DATA_SRC_ID/rel:Photo/@resource');
But Flickr’s more complex than that!
• Flickr doesn’t just have individual photo pages
under *.flickr.com/photos/*
• Also has tag, user, set etc pages.
• We should handle this at our end, so users
only have to add one monkey.
Enter xsl:choose
• Allows if-elseif-else statements in XSL.
<xsl:choose>
<xsl:when test="some_test">
<item>...</item>
</xsl:when>
<xsl:when test="some_other_test">
<item>...</item>
</xsl:when>
<xsl:otherwise>
<item>...</item>
</xsl:otherwise>
</xsl:choose>
Here’s one I made earlier
• http://gallery.search.yahoo.com/application?smid=w4q.s
(source available)
And we’re done…
• There’s lots more you can go away and do.
• We haven’t even looked at infobars.
• You can also fiddle with web services.
• There’s a whole world of opportunity.
• searchmonkey-developers@yahoogroups.com
• http://developer.search.yahoo.com/
Thankyou.
• Any questions?
• These slides are available at:
http://icanhaz.com/monkeys
(redirects to http://www.slideshare.net/neilcrosby/starting-to-monkey-around-with-yahoo-search-monkey/ )

More Related Content

PDF
Semantic and the Internet of Things
David Janes
 
PDF
Semantic Metastandards will Unlock IoT Interoperability
David Janes
 
PDF
Atoms - Semantic Interoperability
David Janes
 
PDF
Control all the Things with Node-JS
David Janes
 
PDF
IOTDB, Semantics and the Internet of Things
David Janes
 
PDF
Interoperability with Standardless IoT (Global IoT Day Wien)
David Janes
 
KEY
Gettingintotheloop 100123225021-phpapp01
Ravi Kumar
 
PPT
Starting to Monkey Around With Yahoo! Search Monkey
Neil Crosby
 
Semantic and the Internet of Things
David Janes
 
Semantic Metastandards will Unlock IoT Interoperability
David Janes
 
Atoms - Semantic Interoperability
David Janes
 
Control all the Things with Node-JS
David Janes
 
IOTDB, Semantics and the Internet of Things
David Janes
 
Interoperability with Standardless IoT (Global IoT Day Wien)
David Janes
 
Gettingintotheloop 100123225021-phpapp01
Ravi Kumar
 
Starting to Monkey Around With Yahoo! Search Monkey
Neil Crosby
 

What's hot (16)

PDF
CSS 201
Jennifer Berk
 
PDF
What a Thing API Should Look Like (Global IoT Day Wien)
David Janes
 
KEY
Irb Tips and Tricks
John McCaffrey
 
PPTX
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Curtiss Grymala
 
PPTX
Geekend 2012 - Jumping Into Tumblr Theme Development
Storyware
 
PPTX
WordPress Themes 101 - PSUWeb13 Workshop
Curtiss Grymala
 
PPTX
Social Sciences Librarians Boot Camp 2012: Zotero and Mendeley
Amanda Izenstark
 
KEY
Becoming a more productive Rails Developer
John McCaffrey
 
KEY
LeanStartup:Research is cheaper than development
John McCaffrey
 
PPTX
WordPress Themes 101 - HighEdWeb New England 2013
Curtiss Grymala
 
KEY
Ruby APIs for NoSQL - Polyglot Persistence - GoGaRuCo 2010
Sarah Mei
 
PPTX
Javascript for the c# developer
Salvatore Fazio
 
PPTX
WordPress Themes 101 - dotEduGuru Summit 2013
Curtiss Grymala
 
PDF
Getting Started with Drupal 8 Theming - DrupalCamp Toronto 2014
Suzanne Dergacheva
 
PPTX
Jquery fundamentals
Salvatore Fazio
 
KEY
Intro to jQuery for Drupal
jhamiltoorion
 
CSS 201
Jennifer Berk
 
What a Thing API Should Look Like (Global IoT Day Wien)
David Janes
 
Irb Tips and Tricks
John McCaffrey
 
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Curtiss Grymala
 
Geekend 2012 - Jumping Into Tumblr Theme Development
Storyware
 
WordPress Themes 101 - PSUWeb13 Workshop
Curtiss Grymala
 
Social Sciences Librarians Boot Camp 2012: Zotero and Mendeley
Amanda Izenstark
 
Becoming a more productive Rails Developer
John McCaffrey
 
LeanStartup:Research is cheaper than development
John McCaffrey
 
WordPress Themes 101 - HighEdWeb New England 2013
Curtiss Grymala
 
Ruby APIs for NoSQL - Polyglot Persistence - GoGaRuCo 2010
Sarah Mei
 
Javascript for the c# developer
Salvatore Fazio
 
WordPress Themes 101 - dotEduGuru Summit 2013
Curtiss Grymala
 
Getting Started with Drupal 8 Theming - DrupalCamp Toronto 2014
Suzanne Dergacheva
 
Jquery fundamentals
Salvatore Fazio
 
Intro to jQuery for Drupal
jhamiltoorion
 
Ad

Similar to Yahoo! Search monkey API - CEBIT 2008 (20)

PPS
Getting Started With Xsl Templates
Will Trillich
 
KEY
Scraping Scripting Hacking
Mike Ellis
 
PPTX
Apache Solr - search for everyone!
Jaran Flaath
 
PPTX
Entity Framework For DBAs
Richie Rump
 
KEY
Windycityrails page performance
John McCaffrey
 
PPTX
JSLink for ITPros - SharePoint Saturday Jersey
Paul Hunt
 
PPTX
SPSDenver - SharePoint & jQuery - What I wish I would have known
Mark Rackley
 
PPTX
Using js link and display templates
Paul Hunt
 
PDF
SPSSTHLM - Using JSLink and Display Templates for ITPros
Paul Hunt
 
PPTX
SUGUK Cambridge - Display Templates & JSLink for IT Pros
Paul Hunt
 
PDF
My site is slow
hernanibf
 
KEY
Contributing to rails
Lukas Eppler
 
PPTX
Power to the People: Manipulating SharePoint with Client-Side JavaScript
PeterBrunone
 
PPTX
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
BIWUG
 
PDF
YAPC::EU 2015 - Perl Conferences
ℕicolas ℝ.
 
PPTX
Spsbe using js-linkanddisplaytemplates
Paul Hunt
 
PDF
Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...
OpenSource Connections
 
PPT
The things we found in your website
hernanibf
 
PDF
Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst
Jun-ichi Sakamoto
 
KEY
AJAX & jQuery - City University WAD Module
Charlie Perrins
 
Getting Started With Xsl Templates
Will Trillich
 
Scraping Scripting Hacking
Mike Ellis
 
Apache Solr - search for everyone!
Jaran Flaath
 
Entity Framework For DBAs
Richie Rump
 
Windycityrails page performance
John McCaffrey
 
JSLink for ITPros - SharePoint Saturday Jersey
Paul Hunt
 
SPSDenver - SharePoint & jQuery - What I wish I would have known
Mark Rackley
 
Using js link and display templates
Paul Hunt
 
SPSSTHLM - Using JSLink and Display Templates for ITPros
Paul Hunt
 
SUGUK Cambridge - Display Templates & JSLink for IT Pros
Paul Hunt
 
My site is slow
hernanibf
 
Contributing to rails
Lukas Eppler
 
Power to the People: Manipulating SharePoint with Client-Side JavaScript
PeterBrunone
 
SharePoint Saturday Belgium 2014 - Using JSLink and Display Templates with th...
BIWUG
 
YAPC::EU 2015 - Perl Conferences
ℕicolas ℝ.
 
Spsbe using js-linkanddisplaytemplates
Paul Hunt
 
Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...
OpenSource Connections
 
The things we found in your website
hernanibf
 
Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst
Jun-ichi Sakamoto
 
AJAX & jQuery - City University WAD Module
Charlie Perrins
 
Ad

More from Eric D. (19)

PPTX
Bonnes pratiques API - Paris Web 2013
Eric D.
 
PDF
Blend Web Mix 2013 : Concevoir son API
Eric D.
 
PPTX
Un peu de TLS ne fait pas de mal - Sudweb 2013
Eric D.
 
PDF
Api - mix it 2013
Eric D.
 
PPTX
Performance des applications web - USI Casa 2011
Eric D.
 
PPTX
Webpagetest en 5 minutes - Sud Web 2011
Eric D.
 
PPTX
Soirée webperf du 29 nov 2010 - Latence et CDN
Eric D.
 
PDF
PHP et Performances - AFUP 2005
Eric D.
 
PDF
Introduction à Rails - Paris on Rails 2006
Eric D.
 
ODP
Utiliser pleinement le navigateur et les nouveaux clients web - AFUP 2007
Eric D.
 
PDF
Yahoo! Fire eagle API - CEBIT 2008
Eric D.
 
PDF
Migrations PHP 5 - Solutions linux 2009
Eric D.
 
PPT
Frameworks php - Solutions Linux 2008
Eric D.
 
PPT
Un web ouvert, Paris Web 2009
Eric D.
 
PPT
Performance des sites web : qui, pourquoi, quoi, comment et où ? - USI 2010
Eric D.
 
PDF
Introduction à la soirée webperf du 21 juillet 2010, Paris
Eric D.
 
PPTX
Performance des sites web - Latence - AFUP 2010
Eric D.
 
PDF
web, métier de valeur - Paris Web 2010
Eric D.
 
ZIP
Performances Web - Afup 2008
Eric D.
 
Bonnes pratiques API - Paris Web 2013
Eric D.
 
Blend Web Mix 2013 : Concevoir son API
Eric D.
 
Un peu de TLS ne fait pas de mal - Sudweb 2013
Eric D.
 
Api - mix it 2013
Eric D.
 
Performance des applications web - USI Casa 2011
Eric D.
 
Webpagetest en 5 minutes - Sud Web 2011
Eric D.
 
Soirée webperf du 29 nov 2010 - Latence et CDN
Eric D.
 
PHP et Performances - AFUP 2005
Eric D.
 
Introduction à Rails - Paris on Rails 2006
Eric D.
 
Utiliser pleinement le navigateur et les nouveaux clients web - AFUP 2007
Eric D.
 
Yahoo! Fire eagle API - CEBIT 2008
Eric D.
 
Migrations PHP 5 - Solutions linux 2009
Eric D.
 
Frameworks php - Solutions Linux 2008
Eric D.
 
Un web ouvert, Paris Web 2009
Eric D.
 
Performance des sites web : qui, pourquoi, quoi, comment et où ? - USI 2010
Eric D.
 
Introduction à la soirée webperf du 21 juillet 2010, Paris
Eric D.
 
Performance des sites web - Latence - AFUP 2010
Eric D.
 
web, métier de valeur - Paris Web 2010
Eric D.
 
Performances Web - Afup 2008
Eric D.
 

Recently uploaded (20)

PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Software Development Methodologies in 2025
KodekX
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 

Yahoo! Search monkey API - CEBIT 2008

  • 1. Starting to Monkey Around With Yahoo! Search Monkey “You’ll never make a monkey out of me” CEBIT Turkey 2008 – Éric Daspet Original presentation by Neil Crosby (One of Yahoo!’s Monkeys in London)
  • 2. Who Am I ? Frontend engineer at Yahoo! but not in the Search Monkey team
  • 3. What is Search Monkey? • A way to create more interesting Search Results. • Enhanced results and Infobar. • Enhanced results fit a tight template, infobars can be far more freeform.
  • 6. Where does the data come from? • Microformats • RDFa • Or pull it in from the page using XSLT
  • 7. My First Monkey • Start with something containing microformats. • FaceBook’s public profile pages fit the bill. • We’ll build a monkey that shows the user’s profile picture. • Go to http://developer.search.yahoo.com/
  • 8. Starting your Monkey – Basic Info • Name • Description • Category (for gallery) • Icon (really important) • Don’t forget to agree to the T&C
  • 9. URLs • Use auto-generate first. • Then choose specific URL for first field. • First URL is used to generate previews in gallery.
  • 10. Data Services • We can ignore this for now since we’re using µformats that are built into Search Monkey.
  • 11. Appearance • This is where we’ll actually do some work. • You must change something from the default here.
  • 12. Using the right hand rail • +/- expands/contracts sections. • Clicking an item pastes that data into your PHP at the cursor.
  • 13. Making our changes $ret['image']['src'] = Data::get('com.yahoo.uf.hcard/rel:Card/vcard:photo/@r esource'); • And that’s all there is to creating a simple monkey!
  • 14. Let others play with your monkey • Once you’re happy with your monkey, share it. • Let users add your monkey to their SERPs. • Share your source if you want to.
  • 15. Monkey 2: Robotic Monkey of Doom • We want a Flickr Monkey that: – Shows main/first photo on a page. – Includes relevant information about photo. • No relevant µformats on the page, so we need some XSLT. • Will be slower than pre-spidered µFormats. • We need to create a data service.
  • 16. Creating the Data Service • Starts the same as a µFormat Monkey does. • Basic Info. • URLs. • Trigger: *.flickr.com/photos/* • First test: http://www.flickr.com/photos/thevoicewithin /1276763134/
  • 17. Now for some XSLT • Scary, but not too scary • Be aware of allowable rel values – see documentation.
  • 18. XSLT First Pass • We want to extract an image URL and a description. • Assume the only page type is the single photo page for now. • Use Firebug and/or XPather in Firefox to work out XPaths to our required nodes.
  • 19. XSLT First Pass <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <adjunctcontainer> <adjunct id="smid:{$smid}" version="1.0"> <item rel="rel:Photo" resource="{//div[@class='photoImgDiv']/img[@class='reflect']/@src}"> <meta property="dc:description"> <xsl:value-of select="//div[@class='photoDescription']"/> </meta> </item> </adjunct> </adjunctcontainer> </xsl:template> </xsl:stylesheet>
  • 20. Save & Refresh • Check that we don’t get any errors. • Then, back to the homepage.
  • 21. Making our Flickr Monkey • Give it a name • Trigger: *.flickr.com/photos/* • First Test: http://www.flickr.com/photos/thevoicewithin /1276763134/
  • 22. Flickr Monkey Data Services • “Add More Data Services” • Because we’re using the same URL trigger for monkey and data source, the source shows up here
  • 23. Flickr Monkey Appearance • Point and click info from the data source. $ret['summary'] = Data::get('smid:DATA_SRC_ID/rel:Photo/dc:description' ); $ret['image']['src'] = Data::get('smid:DATA_SRC_ID/rel:Photo/@resource');
  • 24. But Flickr’s more complex than that! • Flickr doesn’t just have individual photo pages under *.flickr.com/photos/* • Also has tag, user, set etc pages. • We should handle this at our end, so users only have to add one monkey.
  • 25. Enter xsl:choose • Allows if-elseif-else statements in XSL. <xsl:choose> <xsl:when test="some_test"> <item>...</item> </xsl:when> <xsl:when test="some_other_test"> <item>...</item> </xsl:when> <xsl:otherwise> <item>...</item> </xsl:otherwise> </xsl:choose>
  • 26. Here’s one I made earlier • http://gallery.search.yahoo.com/application?smid=w4q.s (source available)
  • 27. And we’re done… • There’s lots more you can go away and do. • We haven’t even looked at infobars. • You can also fiddle with web services. • There’s a whole world of opportunity. • [email protected] • http://developer.search.yahoo.com/
  • 28. Thankyou. • Any questions? • These slides are available at: http://icanhaz.com/monkeys (redirects to http://www.slideshare.net/neilcrosby/starting-to-monkey-around-with-yahoo-search-monkey/ )