Skip to content

masb3/search_eng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  • Overall architecture of the solution:
    Flask on backend to handle request-response for only one route accepting GET/POST. Jinja2 is used for html generation from template.
    Since every search request requires calls to Google API, Bing API and to 10 webpages it was decided to use aiohttp to handle asynchroneous network requests.
    Beautifulsoup is used to simplify parsing html pages to fetch custom snippets.

  • Top 10 combined:
    First are the pages returned by both APIs, next by rotation Bing-Google results up to count 10.

  • Custom snippet:
    Fetched from <meta name="description" content="">, if not present then from title.

  • Challenges:
    Custom snippet generation
    Correct CSS to fullfill requirement: show original snippet if checkbox not checked, otherwise show custom snippet while showing original on snippet hover.
    Problems to obtain Bing API key.

  • Timesheet:
    3h to get Bing API key and make firsat API call.
    2h setup Flask with one route for GET/POST, initial html, async call to Google and Bing, response parse.
    6h choose top 10, fetch custom snippets, prepare for rendering in html, bolding query in custom snippet if matched, getting timestamps, code cleanup.
    2h CSS on frontend.
    1h deployment on Heroku, writing this doc.

  • Demo:
    http://toptensearch.herokuapp.com/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors