Desperate help required for Python assignment

David C. Ullrich ullrich at math.okstate.edu
Wed Oct 17 15:40:54 EDT 2001


On 17 Oct 2001 00:47:07 -0700, nachiket_gole at hotmail.com (Nachiket)
wrote:

>I am new to Python doing a crash course in University.  I have a
>assignment to submit in two days the specifications of which are:
>1.Write a script in python which maps a set of linked webpages.  It
>should take the URL as a command line argument, retireve the page,
>extract the URL's of pages linked to by the page in question and store
>them in a data structure for the page.  It should then repeat this
>with other linked pages to a depth of 5.  It should visit each page
>only once.
>2.The script should also be able to take -L as a command line argument
>and that being the case should only follow links on the same server as
>the current site.
>3.The script should also record the titles of links in the documents
>eg
>Mysite -- > http://mysite.com
>4.Finally all this has to be displayed as a tree for eg
>>python mytest.py "some url"
> http://.....
>   + http://........
>   + http://.......
>      + http://......
> Please can some of the Gurus on this newsgroup help me out with a
>working solution as with my limited knowledge i am no position to
>handle this assignment in two days.

Actually it's a trick question - this cannot be done in Python.
Some of your classmates will be handing in stuff that doesn't
quite do this, hoping for partial credit. You should tell the
teacher you've determined it's impossible - I'm sure he'll be
properly impressed.

>Regards




More information about the Python-list mailing list