HTTrack Programming page - scripting
We will see here several examples, written in batch script (can be adapted to almost all batch script languages) or in C.
| How to get one single file httrack --get http://localhost/ |
| How to get one single file and pipe it to stdout httrack --quiet --get http://localhost/ -O tmpget -V “cat \$0” |
| How to search in all HTML files on a website httrack --skeleton http://localhost/ -V “if grep -iE \”TITLE\“ \”\$0\“>/dev/null; then echo \”Match found at \$0\“; fi” rm -rf tmpget Same thing but matches only the first file: httrack --skeleton http://localhost/ -V “if grep -iE \”TITLE\“ \”\$0\“>/dev/null; then echo \”Match found at \$0\“; kill -9 \$PPID; fi” rm -rf tmpget |
| Indexing a website, and using the index as a search engine httrack localhost -%I Will generate an index.txt file, which contains all detected keywords, sorted and indexed using this format: |
