spider-pig Searches for Nodes that match a CSS Selector

spider-pig on GitHub
spider-pig on npm
spider-pig is a command line utility that takes a URL and retrieves all the local URL links on the page. It can also search for a CSS selector on each local URL to measure the impact of a CSS change.

Get a li…


This content originally appeared on Zach Leatherman and was authored by Zach Leatherman

spider-pig is a command line utility that takes a URL and retrieves all the local URL links on the page. It can also search for a CSS selector on each local URL to measure the impact of a CSS change.

Homer Simpson holding up a pig upside-down pretending that it’s walking on the ceiling

Get a list of local URL links from a root URL. Works with JavaScript generated content.

<a href="test.html">Test</a><!-- match -->
<a href="test2.html">Test</a><!-- match -->
<a href="test2.html">Duplicate Test</a><!-- do not match -->
<a href="root.html">URL to self</a><!-- match -->
<a href="mailto:test@example.com">Email link</a><!-- do not match -->
<a href="http://www.google.com/">External</a><!-- do not match -->

Can also act as a live-DOM CSS search across multiple files (find all the templates that are using the CSS selector I want to change). If I’m worried about changing code in a CSS selector, I’ll use this tool to search for instances of the selector across my project.

spider-pig on the command line


This content originally appeared on Zach Leatherman and was authored by Zach Leatherman


Print Share Comment Cite Upload Translate Updates
APA

Zach Leatherman | Sciencx (2018-01-18T06:00:00+00:00) spider-pig Searches for Nodes that match a CSS Selector. Retrieved from https://www.scien.cx/2018/01/18/spider-pig-searches-for-nodes-that-match-a-css-selector/

MLA
" » spider-pig Searches for Nodes that match a CSS Selector." Zach Leatherman | Sciencx - Thursday January 18, 2018, https://www.scien.cx/2018/01/18/spider-pig-searches-for-nodes-that-match-a-css-selector/
HARVARD
Zach Leatherman | Sciencx Thursday January 18, 2018 » spider-pig Searches for Nodes that match a CSS Selector., viewed ,<https://www.scien.cx/2018/01/18/spider-pig-searches-for-nodes-that-match-a-css-selector/>
VANCOUVER
Zach Leatherman | Sciencx - » spider-pig Searches for Nodes that match a CSS Selector. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2018/01/18/spider-pig-searches-for-nodes-that-match-a-css-selector/
CHICAGO
" » spider-pig Searches for Nodes that match a CSS Selector." Zach Leatherman | Sciencx - Accessed . https://www.scien.cx/2018/01/18/spider-pig-searches-for-nodes-that-match-a-css-selector/
IEEE
" » spider-pig Searches for Nodes that match a CSS Selector." Zach Leatherman | Sciencx [Online]. Available: https://www.scien.cx/2018/01/18/spider-pig-searches-for-nodes-that-match-a-css-selector/. [Accessed: ]
rf:citation
» spider-pig Searches for Nodes that match a CSS Selector | Zach Leatherman | Sciencx | https://www.scien.cx/2018/01/18/spider-pig-searches-for-nodes-that-match-a-css-selector/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.