So … Let’s See !
• Easy to Learn
• Easy to maintain and grow
• Convenient Short‐Cuts
Ex: Str = “Linux Crea=ve Group”
Str_join = Str.split(“ “).join(“+”)
• Transparent, code faster
• Few Syntax Errors, Fewer Bugs
• It’s Fun
• Package Management System for Ruby Applica=ons
• Resolve Dependencies.
• Provides Central Repository of SoUware.
• One Command Rules:
‐ gem install <gem_name>
• Can Have your Own Local Gem Server
‐ gem install <gem_name> ‐‐source <gem_server_ip_and_port>
• Pull informa=on from virtually any website.
• Search by Element ID, Tags, CSS Selectors.
• Parse HTML including broken HTML
• Update HTML
• Use this data anywhere and anyway you want!
• Parse by XPath for directly parsing an element.
• Let’s see …. How it works.
Let’s Parse A Badly
Designed Site !!
• It’s a site that provides weather informa=on for
diﬀerent loca=ons across the globe.
• In the main page they have a badly nested table
• An ideal Web‐Developer could have put them nicely in
divs with meaningful IDs.
• But let’s face the truth and parse the Country Names
and their URLs.