Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19433 > unrolled thread
| Started by | Chris Rebert <clp2@rebertia.com> |
|---|---|
| First post | 2012-01-25 12:59 -0800 |
| Last post | 2012-01-25 12:59 -0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Current Web URL Chris Rebert <clp2@rebertia.com> - 2012-01-25 12:59 -0800
| From | Chris Rebert <clp2@rebertia.com> |
|---|---|
| Date | 2012-01-25 12:59 -0800 |
| Subject | Re: Current Web URL |
| Message-ID | <mailman.5094.1327525176.27778.python-list@python.org> |
On Wed, Jan 25, 2012 at 11:38 AM, William Abdo <william.abdo@verio.net> wrote:
> Hi All,
>
> I have been breaking my brains to find a solution to determining what the
> current URL is in a web browser navigation bar.
>
> It cannot be a prefixed values since I will not know what platform it is
> running from at the time it is opened by the users.
>
> Can this URL be extracted from the navigation bar so it can be parsed?
>
> I tried this “response = urllib2.urlopen('http://www.google.com').geturl()”
> however it seems to always to give me the google url and not the one in the
> navigation bar.
Could you clarify where the Web browser is running and where the
Python script is running in your situation?
Is the Web browser only notional (i.e. you just want to get the final
URL you would reach after requesting some given URL as if your script
were a browser)?
If no, what if there are multiple browsers or browser windows open?
Which URL bar would you want the URL from?
Cheers,
Chris
Back to top | Article view | comp.lang.python
csiph-web