Rants about Java and other internet technologies by Sam Pullara

Yuil is dead! 4hoursearch is now online.

was published on August 1st, 2008 and is listed in Technology

As this was really just a demonstration of the power of Yahoo! BOSS, I have brought the site back as a demonstration site. Additionally, Yahoo! is making the source code to the new site available so anyone with a knack for Python, HTML and CSS can take a swipe at making a better search experience.  In order to make a nice UI I teamed up with another Sam, Sam Lind.  I put together the skeleton using Yahoo!’s amazing YUI tools and he created the look and feel.  Please try it out and take advantage of Yahoo!’s open search API:

 

 

Why 4hoursearch?  It took 4 hours to write the initial code, 4 hours for it to go from unknown to 20 hits / second, 4 hours looking for a domain name and 4 hours to build the brand new UI.  Fortunately, it won’t take 4 hours to find something with it :)

If you want the classic list of links, now enhanced with SearchMonkey results, you can always start here.

"Yuil is dead! 4hoursearch is now online." was published on August 1st, 2008 and is listed in Technology.

Follow comments via the RSS Feed | Leave a comment | Trackback URL

  • Gene
    You should have done a eponymous satire: puillara.com ?
  • FIRST!!!

    Seriously, cool job. It is also super fast.
  • teddrakefuckshismom
    twat, you're not even first comment you fucking bell-end
  • "The requested URL /src/4hoursearch-src.zip was not found on this server."

    :-)

    -Russ
  • sam

    “The requested URL /src/4hoursearch-src.zip was not found on this server.”


    <img src="http://www.javarants.com/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley"> </img>


    -Russ




    Ugh. Bad push, just saw it in the log, fixed.
  • Just wondering. What's up with the image next to the first returned result? The image next to the first search for my name is from some random other site and has no connection to the listing.
  • sam

    Just wondering. What’s up with the image next to the first returned result? The image next to the first search for my name is from some random other site and has no connection to the listing.




    Sorry it didn't work well for you. The image is the #1 image search result for the same query. If you click on the image rather than the search result it will go through to the site that it was found on.
  • Took me a while to work out what looked wrong with the results page. No adverts! Thanks!
  • james
    Dudes, you rock! Yahoo is innovating, keep it up! Wish you all the very best, guys.
  • http://www.4hoursearch.com/search?q=mémoires



    Traceback (most recent call last):
    File "/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 499, in __call__
    handler.get(*groups)
    File "/base/data/home/apps/yoolsearch/1.209/search.py", line 37, in get
    result = search(query, count=10)
    File "/base/data/home/apps/yoolsearch/1.209/yos/boss/ysearch.py", line 41, in search
    url = SEARCH_API_URL % (vertical, version, quote_plus(command), start, count, lang, region, filter, dimensions) + params(more)
    File "/base/python_dist/lib/python2.5/urllib.py", line 1213, in quote_plus
    return quote(s, safe)
    File "/base/python_dist/lib/python2.5/urllib.py", line 1205, in quote
    res = map(safe_map.__getitem__, s)
    KeyError: u'\xe9'
  • sam
    Yeah, I suck at python. If anyone knows a better call to use than 'quote_plus' that works with UNICODE, I'm all ears.
  • Yannick
    This is cool, nice job!
    Can you have control on the ads shown or can you only display Yahoo Ads?
  • NICE SAM! definitely support you, wrote an entry on my blog to help support you as well.
    http://blabtech.blogspot.com
  • dvs
    Yeah, I suck at python. If anyone knows a better call to use than ‘quote_plus’ that works with UNICODE, I’m all ears.

    http://www.4hoursearch.com/search?q=python+quot... ;)
    The functions django.utils.http.urlquote() and django.utils.http.urlquote_plus() are versions of Python’s standard urllib.quote() and urllib.quote_plus() that work with non-ASCII characters. (The data is converted to UTF-8 prior to encoding.)
  • sam

    The functions django.utils.http.urlquote() and django.utils.http.urlquote_plus() are versions of Python’s standard urllib.quote() and urllib.quote_plus() that work with non-ASCII characters. (The data is converted to UTF-8 prior to encoding.)




    That fails in the same way as it is a wrapper on quote_plus.
  • sam

    For IRIs to URIs in Python (like http://www.4hoursearch.com/search?q=mémoires) see:

    http://code.djangoproject.com/browser/django/trunk/django/utils/encoding.py




    This isn't included in Google App Engine -- it has an older version of Django -- but I ported it over and it works great! Please test out the unicode support now.
  • Congrats, getting it up so fast is pretty cool. The problem with any search engine front end built around Yahoo's API is that it's...well, built around Yahoo's API. No matter how good of a coder you are, fact is that the search results are still based on Yahoo's indexes, which just isn't as comprehensive as Google's. (Don't like Google btw, just saying). Or am I missing something?
  • http://www.4hoursearch.com/search?q=mp3+download

    resulted an error:

    Traceback (most recent call last):
    File "/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 499, in __call__
    handler.get(*groups)
    File "/base/data/home/apps/yoolsearch/1.216/search.py", line 52, in get
    template_values['image'] = image_response['resultset_images'][0]
    KeyError: 'resultset_images'
  • It's now working fine (: what was causing the error btw?
    http://www.4hoursearch.com/search?q=mp3+download
    resulted an error:
    Traceback (most recent call last):
    File “/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py”, line 499, in __call__
    handler.get(*groups)
    File “/base/data/home/apps/yoolsearch/1.216/search.py”, line 52, in get
    template_values['image'] = image_response['resultset_images'][0]
    KeyError: ‘resultset_images’
  • sam

    It’s now working fine (: what was causing the error btw?


    http://www.4hoursearch.com/search?q=mp3+download

    resulted an error:


    Traceback (most recent call last):


    File “/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py”, line 499, in __call__


    handler.get(*groups)


    File “/base/data/home/apps/yoolsearch/1.216/search.py”, line 52, in get


    template_values['image'] = image_response['resultset_images'][0]


    KeyError: ‘resultset_images’




    An underlying BOSS web service regressed temporarily, it has been corrected.
  • Hey the pagination seems to not be working. It forgets the query string and doesn't have a page as a parameter.

    Other than that, good work!
  • sam

    Hey the pagination seems to not be working. It forgets the query string and doesn’t have a page as a parameter.


    Other than that, good work!




    Hi Jim, I wasn't able to reproduce this. It may be that there aren't enough results -- I am not handling that case well. Can you give me an example query where it doesn't work for you?
  • sam

    Searched for ‘porn’, clicked on page 10, bam, it breaks


    http://www.4hoursearch.com/search?q=porn&p=10


    Traceback (most recent call last):

    File “/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py”, line 499, in __call__


    handler.get(*groups)


    File “/base/data/home/apps/yoolsearch/1.232/search.py”, line 40, in get


    ysr = result['ysearchresponse']


    TypeError: ‘NoneType’ object is unsubscriptable




    My error checking is not "robust". That looks like I didn't get a response back from the urlfetch. Could have been Google App Engine or BOSS. I should check for that and put up the fail whale.
  • I'm looking to integrate search into my site and think that this may be a start.

    EuropeanKiss | Free Online Dating Community
    http://www.europeankiss.org
  • Hi sam,
    I just tried yours and it works great. Can you help me to add a functional button similar to Google's "I'm feeling lucky". I'm kinda suck at python.
    Thank you.
  • I tried it out, looks pretty good.
  • The Open Source Search is a great idea.

    Results better than Cuil.

    The image thing is better than Cuil's, but I still think it a rediculus idea.

    Carry on the good job !
  • Hey sam -- very cool "4 hour" project! I wish I had your mad skills :)

    I was playing around with it and tried searching for my morning jacket (http://www.4hoursearch.com/search?q=my+morning+...) but got an error:

    Traceback (most recent call last):
    File "/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 499, in __call__
    handler.get(*groups)
    File "/base/data/home/apps/yoolsearch/1.234/search.py", line 39, in get
    resultset_glue = glue(q)
    File "/base/data/home/apps/yoolsearch/1.234/yos/boss/ysearch.py", line 56, in glue
    data = load(url)
    File "/base/data/home/apps/yoolsearch/1.234/yos/boss/ysearch.py", line 64, in load
    data = rest.download(url)
    File "/base/data/home/apps/yoolsearch/1.234/yos/crawl/rest.py", line 18, in download
    result = urlfetch.fetch(url)
    File "/base/python_lib/versions/1/google/appengine/api/urlfetch.py", line 216, in fetch
    raise DownloadError(str(e))
    DownloadError: ApplicationError: 3
  • Joe
    I need a break from some projects I'm working on using Boss and Appengine, and had a search engine idea. I think you've done half the work already for another random idea I had for a search engine. Going to enjoy playing with this i think, thanks!
  • Hey Sam

    I built a small search and used some of your code from the 4hoursearch in it. Do you think its fine or i should rewrite everything from scratch. The url is:
    http://itsfrosty.appspot.com/

    Would have sent a personal email, but you don't have contact info published on the blog :(

    regards
    himanshu
  • Mahalakshmi V.M.
    I am facing this error. Please help me out


    Traceback (most recent call last):
    File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp\__init__.py", line 499, in __call__
    handler.get(*groups)
    File "C:\Program Files\Google\google_appengine\4hoursearch\search.py", line 37, in get
    result = search(query, count=10)
    File "C:\Program Files\Google\google_appengine\4hoursearch\yos\boss\ysearch.py", line 44, in search
    data = load(url)
    File "C:\Program Files\Google\google_appengine\4hoursearch\yos\boss\ysearch.py", line 64, in load
    data = rest.download(url)
    File "C:\Program Files\Google\google_appengine\4hoursearch\yos\crawl\rest.py", line 18, in download
    result = urlfetch.fetch(url)
    File "C:\Program Files\Google\google_appengine\google\appengine\api\urlfetch.py", line 267, in fetch
    raise DownloadError(str(e))
    DownloadError: ApplicationError: 2 timed out
  • sam
    I have seen this error from time to time when Yahoo! BOSS takes too long to respond back to Google App Engine. Are you asking for a lot of results?

    Sam
  • 4hoursearch looks great. I have a search engine that uses a single PHP file to query Yahoo Boss. It works like a charm, except that it doesn't yet do image and news search. if anyone wants to download and use it or amend it so that it does do image and news search, you can find it at: http://www.subscribetomyblog.com/spotlight/yaho....
  • Very awesome indeed!
  • deri
    Where I can store my Yahho AppID? Where is the config file?
blog comments powered by Disqus

YUI-Mainstream Theme by Buzzdroid.com

 Premium Wordrpess Theme