src/_README.md in curlyq-0.0.5 vs src/_README.md in curlyq-0.0.6

- old
+ new

@@ -182,14 +182,13 @@ "height": "226", "alt": "Banner image for CurlyQ", "title": "CurlyQ, curl better", "attrs": [ { - "key": "class", - "value": [ + "class": [ "aligncenter" - ], // all attributes included + ], // all attributes included } ] } @@ -243,12 +242,27 @@ Returns all the links on the page, which can be queried on any attribute. Example: - curlyq images -t img -q '[width>750]' https://brettterpstra.com + curlyq links -q '[content*=twitter]' 'https://stackoverflow.com/questions/52428409/get-fully-rendered-html-using-selenium-webdriver-and-python' + [ + { + "href": "https://twitter.com/stackoverflow", + "title": null, + "rel": null, + "content": "Twitter", + "class": [ + "-link", + "js-gps-track" + ] + } + ] + +This example gets all links from the page but only returns ones with link content containing 'twitter' (`-q '[content*=twitter]'`). + ``` @cli(bundle exec bin/curlyq help links) ``` ##### scrape @@ -297,9 +311,29 @@ ``` ##### tags Return a hierarchy of all tags in a page. Use `-t` to limit to a specific tag. + + curlyq tags --search '#main .post h3' -q 'attrs[id*=what]' https://brettterpstra.com/2024/01/10/introducing-curlyq-a-pipeline-oriented-curl-helper/ + + [ + { + "tag": "h3", + "source": "<h3 id=\"whats-next\">What’s Next</h3>", + "attrs": [ + { + "id": "whats-next" + } + ], + "content": "What’s Next", + "tags": [ + + ] + } + ] + +The above command filters the tags based on a CSS query, then further filters them to just tags with an id containing 'what'. ``` @cli(bundle exec bin/curlyq help tags) ```