I tested wget using the list available at https://en.wikipedia.org/wiki/Comparison_of_programming_languages_%28syntax%29#Inline_comments
I discovered that wget does not support a comment character. However, the following generate quick "Invalid URL" errors:
: Test comment 1 list: Invalid URL : Test comment 1: Scheme missing
:: Test comment 2 list: Invalid URL :: Test comment 2: Scheme missing
# Test comment 3 list: Invalid URL http://# Test comment 3: Invalid host name
// Test comment 4 list: Invalid URL // Test comment 4: Scheme missing
These were not listed on the Wikipedia article but also cause quick "Invalid URL" errors
/ Test comment 1 list: Invalid URL / Test comment 1: Scheme missing
[ Test comment 1 list: Invalid URL http://[ Test comment 1: Unterminated IPv6 numeric address
@ Test comment 1 list: Invalid URL http://@ Test comment 1: Invalid user name
? Test comment 1 list: Invalid URL http://? Test comment 1: Invalid host name
The remaining comment lead-in character strings all caused wget to
attempt to resolve a domain name using DNS resulting in at least eight
lines of error output.
I also discovered that wget scans the entire list file and builds a list of URLs to fetch before it starts fetching. For example if you have a list file containing:
# test comment 1
# test comment 2
http://superuser.com/questions/265711/commenting-in-a-wget-list
# test comment 3
# test comment 4
# test comment 5
# test comment 6
The wget output is:
list: Invalid URL http://# test comment 1: Invalid host name
list: Invalid URL http://# test comment 2: Invalid host name
list: Invalid URL http://# test comment 3: Invalid host name
list: Invalid URL http://# test comment 4: Invalid host name
list: Invalid URL http://# test comment 5: Invalid host name
list: Invalid URL http://# test comment 6: Invalid host name
--2015-08-19 14:03:55-- http://superuser.com/questions/265711/commenting-in-a-wget-list
Resolving superuser.com (superuser.com)... 190.93.247.58, 190.93.244.58, 141.101.114.59, ...
Connecting to superuser.com (superuser.com)|190.93.247.58|:80... connected.
HTTP request sent, awaiting response... 200 OK
<snip>
Thus, while : :: # / // [ @ ? can all safely be used as comment lead-in characters the resulting errors will be output first and will not be in-line with the wget attempts to fetch pages.
Yeah HTML makes it way too messy. Thanks for the clarification. – n0pe – 2011-04-02T13:01:27.590