{"repo":"antchfx/htmlquery","free":true,"listed":false,"github":"https://github.com/antchfx/htmlquery","clone":"git clone https://github.com/antchfx/htmlquery.git","description":"htmlquery is golang XPath package for HTML query.","language":"Go","stars":781,"topics":["html","xpath","html-parser","golang","xpath-selector","go","xpath2"],"license":"MIT","category":"dev-tools","readme_excerpt":"htmlquery Overview htmlquery is an XPath query package for HTML, lets you extract data or evaluate from HTML documents by an XPath expression. htmlquery built-in the query object caching feature based on LRU, this feature will caching the recently used XPATH query string. Enable query caching can avoid re-compile XPath expression each query. You can visit this page to learn about the supported XPath(1.0/2.0) syntax. https://github.com/antchfx/xpath XPath query packages for Go Name Description ------------------------------------------------- ----------------------------------------- htmlquery XPath query package for the HTML document xmlquery XPath query package for the XML document jsonquery XPath query package for the JSON document Installation Getting Started Query, returns matched elements or error. Load HTML document from URL. Load HTML from document. Load HTML document from string. Find all A elements. Find all A elements that have href attribute. Find all A elements with href attribute and only return href value. Find the third A element. Find children element (img) under A href and print the source Evaluate the number of all IMG element. Quick Starts FAQ Find() vs QueryAll() , which is better? Find and QueryAll both do the same things, searches all of matched html nodes. The Find will panics if you give an error XPath query, but QueryAll will return an error for you. Can I save my query expression object for the next query? Yes, you can. We offer the QuerySelector and","default_branch":null,"files":null,"tree":[],"storefront":"/r/antchfx","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/antchfx/htmlquery/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}