Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

i did it!!!

by hnd (Scribe)
on Jun 26, 2009 at 04:38 UTC ( #774907=perlmeditation: print w/replies, xml ) Need Help??

once my college professors asked me to simulate google
man..tough one....
so i wikied on the working of google and ended up analyzing the PageRank algo
also i found a lnk to calculate the page rank so i did this
use LWP::Simple;
print "enter url\n";
$doc=get "$url";
print "$doc\n";
the output was then transfered to a file the file sorted and boom i simulated google (well not exactly.....)
the faculty was so impressed that they gave me an A+ for this and showed this program to te visiting faculty during the fest

Replies are listed 'Best First'.
Re: i did it!!!
by whakka (Hermit) on Jun 26, 2009 at 18:03 UTC
    Congratulations - I had the same feeling the first time I got a bot working the way I wanted to. Especially coming from a non-dev background, I can understand the initial confusion about how the whole "internet" thing works and the warm feelings of demystification.

    Now, however, you should start worrying about the other side of the coin. In Google's terms of service they specifically tell you not to do what your program does. Particularly relevant is this section:

    5.3 You agree not to access (or attempt to access) any of the Services by any means other than through the interface that is provided by Google, unless you have been specifically allowed to do so in a separate agreement with Google. You specifically agree not to access (or attempt to access) any of the Services through any automated means (including use of scripts or web crawlers) and shall ensure that you comply with the instructions set out in any robots.txt file present on the Services.

    And in the robots.txt file (always at http://www.<foo>.com/robots.txt):

    User-agent: * Allow: /searchhistory/ Disallow: /search ...

    And, by the way, don't be surprised to see your script cause embarrassment when it suddenly stops working. Google is exceptionally good at picking up on scripts like yours and blocking your IP. This happened to me the first time I tried to batch their geocoding service - even when I "randomized" pauses in between requests. They're serious when they say to follow their API and its intended use!

Re: i did it!!!
by Anonymous Monk on Jun 26, 2009 at 12:53 UTC
    once my college professors asked me to simulate google man..tough one....
    for a whole minute I thought I was going to see a site search algorithm..
Re: i did it!!!
by chrissponias (Initiate) on Jun 28, 2009 at 04:52 UTC
    This is fantastic. Congratulations!

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://774907]
Approved by graff
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2022-05-29 03:24 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (101 votes). Check out past polls.