top | item 863284 "How do I set the User-Agent string in Java?" - L. Page (1996) 173 points| frisco | 16 years ago |guyro.typepad.com | reply 39 comments order hn newest [+] [-] donw|16 years ago|reply Why didn't he just Googl... er... uh... nevermind. [+] [-] wlievens|16 years ago|reply This is magnificent. I imagine decades from now, web archeology will be a true academic discipline. [+] [-] pavel_lishin|16 years ago|reply You should read "A Deepness In The Sky" and "A Fire Upon The Deep"; the topic is actually covered fairly well. [+] [-] borism|16 years ago|reply yes, but allow me to point out that Usenet is not exactly Web. [+] [-] frisco|16 years ago|reply Original, for reference: http://groups.google.com/group/comp.lang.java/msg/88fa108450... [+] [-] n-named|16 years ago|reply And with the answer: http://groups.google.com/group/comp.lang.java/browse_thread/... [+] [-] mynameishere|16 years ago|reply Can't blame him for not googling it himself. [+] [-] huherto|16 years ago|reply This reminds me of Doc Brown in 1955 before he invented his time machine. (In Back to the future) [+] [-] sofal|16 years ago|reply I imagine his bot has undergone a couple of revisions since then. [+] [-] swombat|16 years ago|reply I wonder if it still runs under Java 1.0. load replies (1) [+] [-] sown|16 years ago|reply The internet has a neat ability to remember things. [+] [-] staunch|16 years ago|reply I thought they were using Python back then? Has anyone ever talked about the structure of Google v1? Code made public? [+] [-] basugasubaku|16 years ago|reply This is probably the closest you'll find:http://infolab.stanford.edu/~backrub/google.html load replies (1) [+] [-] yupbank|16 years ago|reply with the eclipse u'll never worry about such question~ [+] [-] technomancy|16 years ago|reply The hilarious bit is that they dropped Java for Python, probably due to the massive levels of frustration encountered when trying to do simple things like this. [+] [-] litewulf|16 years ago|reply In practice, almost all core code is C++/Java (vast majority is C++, though its slowly shifting), with Python relegated mainly to scripting glue. [+] [-] axod|16 years ago|reply Setting a user-agent isn't exactly a core language thing. HTTP is an add-on library, of which there are many to choose from.I know you saw the title and thought "ahahaha easy time to bash Java again", but it's really ignorant to do so. load replies (1) [+] [-] qw|16 years ago|reply It was simple. This is the code he had to use (assuming he used URLConnection)connection.setRequestProperty ("User-agent", "GoogleBot/0.01");I had never done this before and found it out by looking at the javadoc. I don't see how switching to Python would have made this easier. load replies (2)
[+] [-] wlievens|16 years ago|reply This is magnificent. I imagine decades from now, web archeology will be a true academic discipline. [+] [-] pavel_lishin|16 years ago|reply You should read "A Deepness In The Sky" and "A Fire Upon The Deep"; the topic is actually covered fairly well. [+] [-] borism|16 years ago|reply yes, but allow me to point out that Usenet is not exactly Web.
[+] [-] pavel_lishin|16 years ago|reply You should read "A Deepness In The Sky" and "A Fire Upon The Deep"; the topic is actually covered fairly well.
[+] [-] frisco|16 years ago|reply Original, for reference: http://groups.google.com/group/comp.lang.java/msg/88fa108450... [+] [-] n-named|16 years ago|reply And with the answer: http://groups.google.com/group/comp.lang.java/browse_thread/...
[+] [-] n-named|16 years ago|reply And with the answer: http://groups.google.com/group/comp.lang.java/browse_thread/...
[+] [-] mynameishere|16 years ago|reply Can't blame him for not googling it himself. [+] [-] huherto|16 years ago|reply This reminds me of Doc Brown in 1955 before he invented his time machine. (In Back to the future)
[+] [-] huherto|16 years ago|reply This reminds me of Doc Brown in 1955 before he invented his time machine. (In Back to the future)
[+] [-] sofal|16 years ago|reply I imagine his bot has undergone a couple of revisions since then. [+] [-] swombat|16 years ago|reply I wonder if it still runs under Java 1.0. load replies (1)
[+] [-] staunch|16 years ago|reply I thought they were using Python back then? Has anyone ever talked about the structure of Google v1? Code made public? [+] [-] basugasubaku|16 years ago|reply This is probably the closest you'll find:http://infolab.stanford.edu/~backrub/google.html load replies (1)
[+] [-] basugasubaku|16 years ago|reply This is probably the closest you'll find:http://infolab.stanford.edu/~backrub/google.html load replies (1)
[+] [-] technomancy|16 years ago|reply The hilarious bit is that they dropped Java for Python, probably due to the massive levels of frustration encountered when trying to do simple things like this. [+] [-] litewulf|16 years ago|reply In practice, almost all core code is C++/Java (vast majority is C++, though its slowly shifting), with Python relegated mainly to scripting glue. [+] [-] axod|16 years ago|reply Setting a user-agent isn't exactly a core language thing. HTTP is an add-on library, of which there are many to choose from.I know you saw the title and thought "ahahaha easy time to bash Java again", but it's really ignorant to do so. load replies (1) [+] [-] qw|16 years ago|reply It was simple. This is the code he had to use (assuming he used URLConnection)connection.setRequestProperty ("User-agent", "GoogleBot/0.01");I had never done this before and found it out by looking at the javadoc. I don't see how switching to Python would have made this easier. load replies (2)
[+] [-] litewulf|16 years ago|reply In practice, almost all core code is C++/Java (vast majority is C++, though its slowly shifting), with Python relegated mainly to scripting glue.
[+] [-] axod|16 years ago|reply Setting a user-agent isn't exactly a core language thing. HTTP is an add-on library, of which there are many to choose from.I know you saw the title and thought "ahahaha easy time to bash Java again", but it's really ignorant to do so. load replies (1)
[+] [-] qw|16 years ago|reply It was simple. This is the code he had to use (assuming he used URLConnection)connection.setRequestProperty ("User-agent", "GoogleBot/0.01");I had never done this before and found it out by looking at the javadoc. I don't see how switching to Python would have made this easier. load replies (2)
[+] [-] donw|16 years ago|reply
[+] [-] wlievens|16 years ago|reply
[+] [-] pavel_lishin|16 years ago|reply
[+] [-] borism|16 years ago|reply
[+] [-] frisco|16 years ago|reply
[+] [-] n-named|16 years ago|reply
[+] [-] mynameishere|16 years ago|reply
[+] [-] huherto|16 years ago|reply
[+] [-] sofal|16 years ago|reply
[+] [-] swombat|16 years ago|reply
[+] [-] sown|16 years ago|reply
[+] [-] staunch|16 years ago|reply
[+] [-] basugasubaku|16 years ago|reply
http://infolab.stanford.edu/~backrub/google.html
[+] [-] yupbank|16 years ago|reply
[+] [-] technomancy|16 years ago|reply
[+] [-] litewulf|16 years ago|reply
[+] [-] axod|16 years ago|reply
I know you saw the title and thought "ahahaha easy time to bash Java again", but it's really ignorant to do so.
[+] [-] qw|16 years ago|reply
connection.setRequestProperty ("User-agent", "GoogleBot/0.01");
I had never done this before and found it out by looking at the javadoc. I don't see how switching to Python would have made this easier.