This is nearly the same question you asked under another name yesterday. Its not clear what you really want to do. You are asking what the url is of the page you retrieve by providing the same url.
On Fri, Nov 1, 2013 at 7:33 AM, Alister <alister.w...@ntlworld.com> wrote: > On Thu, 31 Oct 2013 08:59:00 -0700, bhaktanishant wrote: > >> I want to extract the page-url. for example: >> if i have this code >> >> import urllib2 from bs4 import BeautifulSoup link = >> "http://www.google.com" >> page = urllib2.urlopen(link).read() >> soup = BeautifulSoup(page) >> >> then i can extract title of page by: >> >> title = soup.title >> >> but i want to know that how to extract page-URL from "soup" that will be >> "http://www.google.com" > > I must be missing something here, the page url is what you use to open > the page in the first place in your case link. > > > > > -- > May a Misguided Platypus lay its Eggs in your Jockey Shorts. > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list