Part of your problem will be that there is no way to consistently
determine whether the addresses are duplicate.  In most cases, yes,
www.example.com and example.com are the same site -- but in some
they're not.  Ditto for index.html, index.php, etc. (yes, I've seen
sites where index.html and index.php were different pages and both in
use -- *facepalm*), and URL parameters (how do you tell which are
search parameters and which are session tracking parameters, or
what?)  All of that can differ from one site to another.

Unless the duplicate-checking is an absolutely crucial feature, my
advice would be to treat the URL with and without "http://"; as the
same, and assume other variants are all different.

On Oct 5, 1:35 pm, harryos <oswald.ha...@gmail.com> wrote:
> The user can enter a website address which will be tracked by the
> program for certain info and then a message is sent to the user's
> mail.The  user can enter many such addresses.The problem is that he
> may accidently enter different variations of the url..and if I don't
> validate it for duplicates ,the program will be doing the same work
> again unnecessarily.
> if user giveshttp://www.djangocon.usand djangocon.us orhttp://djangocon.us
> ,the program will use those in urllib.urlopen(urlstring) ,and the read
> page /data will be the same.
> .This is why I need to consider the validation for duplicates
> thanks for the replies
> harry
>
> On Oct 5, 10:00 pm, Steve Holden <holden...@gmail.com> wrote:
>
> > What aboutwww.mysite.com/default.asp?Itmight be helpful if you could
> > give us a little more insight into the real requirement here, rather
> > than a technical question based on some interpretation of the requirement.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to