ruby - How do I read the content of every HTML tag using Mechanize? -


how write mechanize scraper content every html tag on web page? or need convert page string , use regex content between \<.*?\> , \<\/.*?\>?

to find more information regarding writing web scraper mechanize take @ following tutorials:

also keep in mind mechanize uses nokogiri gem underlying scraping. if not attached mechanize consider using nokogiri parse html tags.

do not convert page string , use regex html content. see this answer more information on why bad idea.

--edit--

as @pguardiario mentioned in comment below, code content each tag page.search(*).map &:text


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -