Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #29624 > unrolled thread
| Started by | BobAalsma <overhaalsgang_24_bob@me.com> |
|---|---|
| First post | 2012-09-21 05:57 -0700 |
| Last post | 2012-09-22 14:01 +0200 |
| Articles | 18 — 8 participants |
Back to article view | Back to comp.lang.python
How to apply the user's HTML environment in a Python programme? BobAalsma <overhaalsgang_24_bob@me.com> - 2012-09-21 05:57 -0700
Re: How to apply the user's HTML environment in a Python programme? Joel Goldstick <joel.goldstick@gmail.com> - 2012-09-21 09:22 -0400
Re: How to apply the user's HTML environment in a Python programme? BobAalsma <overhaalsgang_24_bob@me.com> - 2012-09-21 06:31 -0700
Re: How to apply the user's HTML environment in a Python programme? Jerry Hill <malaclypse2@gmail.com> - 2012-09-21 09:36 -0400
Re: How to apply the user's HTML environment in a Python programme? BobAalsma <overhaalsgang_24_bob@me.com> - 2012-09-21 06:58 -0700
Re: How to apply the user's HTML environment in a Python programme? Joel Goldstick <joel.goldstick@gmail.com> - 2012-09-21 10:15 -0400
Re: How to apply the user's HTML environment in a Python programme? BobAalsma <overhaalsgang_24_bob@me.com> - 2012-10-01 07:19 -0700
Re: How to apply the user's HTML environment in a Python programme? Ramchandra Apte <maniandram01@gmail.com> - 2012-10-02 09:17 -0700
Re: How to apply the user's HTML environment in a Python programme? Peter Otten <__peter__@web.de> - 2012-09-21 16:33 +0200
Re: How to apply the user's HTML environment in a Python programme? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-21 16:09 -0400
Re: How to apply the user's HTML environment in a Python programme? BobAalsma <overhaalsgang_24_bob@me.com> - 2012-09-22 04:38 -0700
Re: How to apply the user's HTML environment in a Python programme? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-22 11:18 -0400
Re: How to apply the user's HTML environment in a Python programme? BobAalsma <overhaalsgang_24_bob@me.com> - 2012-09-22 04:38 -0700
Re: How to apply the user's HTML environment in a Python programme? BobAalsma <overhaalsgang_24_bob@me.com> - 2012-09-21 06:31 -0700
Re: How to apply the user's HTML environment in a Python programme? David Smith <davids@invtools.com> - 2012-09-21 11:28 -0400
Re: How to apply the user's HTML environment in a Python programme? BobAalsma <overhaalsgang_24_bob@me.com> - 2012-09-22 04:34 -0700
Re: How to apply the user's HTML environment in a Python programme? BobAalsma <overhaalsgang_24_bob@me.com> - 2012-09-22 04:34 -0700
Re: How to apply the user's HTML environment in a Python programme? Thomas Jollans <t@jollybox.de> - 2012-09-22 14:01 +0200
| From | BobAalsma <overhaalsgang_24_bob@me.com> |
|---|---|
| Date | 2012-09-21 05:57 -0700 |
| Subject | How to apply the user's HTML environment in a Python programme? |
| Message-ID | <4382e132-4eb5-4733-9fed-535e704f2175@googlegroups.com> |
I'd like to write a programme that will be offered as a web service (Django), in which the user will point to a specific URL and the programme will be used to read the text of that URL. This text can be behind a username/password, but for several reasons, I don't want to know those. So I would like to set up a situation where the user logs in (if/when appropriate), points out the URL to my programme and my programme would then be able to read that particular text. I'm aware this may sound fishy. It should not be: I want the user to be fully aware and in control of this process. Any thoughts on how to approach this? Best regards, Bob
[toc] | [next] | [standalone]
| From | Joel Goldstick <joel.goldstick@gmail.com> |
|---|---|
| Date | 2012-09-21 09:22 -0400 |
| Message-ID | <mailman.1006.1348233763.27098.python-list@python.org> |
| In reply to | #29624 |
On Fri, Sep 21, 2012 at 8:57 AM, BobAalsma <overhaalsgang_24_bob@me.com> wrote: > I'd like to write a programme that will be offered as a web service (Django), in which the user will point to a specific URL and the programme will be used to read the text of that URL. > > This text can be behind a username/password, but for several reasons, I don't want to know those. > > So I would like to set up a situation where the user logs in (if/when appropriate), points out the URL to my programme and my programme would then be able to read that particular text. > > I'm aware this may sound fishy. It should not be: I want the user to be fully aware and in control of this process. > > Any thoughts on how to approach this? There are several python modules to get web pages. urllib, urllib2 and another called requests. (http://kennethreitz.com/requests-python-http-module.html) Check those out > > Best regards, > Bob > -- > http://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick
[toc] | [prev] | [next] | [standalone]
| From | BobAalsma <overhaalsgang_24_bob@me.com> |
|---|---|
| Date | 2012-09-21 06:31 -0700 |
| Message-ID | <b6b4f390-1f33-452d-9d78-5681f4557d96@googlegroups.com> |
| In reply to | #29628 |
Op vrijdag 21 september 2012 15:23:14 UTC+2 schreef Joel Goldstick het volgende: > On Fri, Sep 21, 2012 at 8:57 AM, BobAalsma wrote: > > > I'd like to write a programme that will be offered as a web service (Django), in which the user will point to a specific URL and the programme will be used to read the text of that URL. > > > > > > This text can be behind a username/password, but for several reasons, I don't want to know those. > > > > > > So I would like to set up a situation where the user logs in (if/when appropriate), points out the URL to my programme and my programme would then be able to read that particular text. > > > > > > I'm aware this may sound fishy. It should not be: I want the user to be fully aware and in control of this process. > > > > > > Any thoughts on how to approach this? > > > > There are several python modules to get web pages. urllib, urllib2 > > and another called requests. > > (http://kennethreitz.com/requests-python-http-module.html) Check > > those out > > > > > > Best regards, > > > Bob > > > -- > > > http://mail.python.org/mailman/listinfo/python-list > > > > > > > > -- > > Joel Goldstick Thanks, Joel, yes, but as far as I'm aware these would all require the Python programme to have the user's username and password (or "credentials"), which I wanted to avoid.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Hill <malaclypse2@gmail.com> |
|---|---|
| Date | 2012-09-21 09:36 -0400 |
| Message-ID | <mailman.1008.1348234570.27098.python-list@python.org> |
| In reply to | #29629 |
On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma <overhaalsgang_24_bob@me.com> wrote: > Thanks, Joel, yes, but as far as I'm aware these would all require the Python programme to have the user's username and password (or "credentials"), which I wanted to avoid. No matter what you do, your web service is going to have to authenticate with the remote web site. The details of that authentication are going to vary with each remote web site you want to connect to. -- Jerry
[toc] | [prev] | [next] | [standalone]
| From | BobAalsma <overhaalsgang_24_bob@me.com> |
|---|---|
| Date | 2012-09-21 06:58 -0700 |
| Message-ID | <mailman.1011.1348235931.27098.python-list@python.org> |
| In reply to | #29631 |
Op vrijdag 21 september 2012 15:36:11 UTC+2 schreef Jerry Hill het volgende: > On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote: > > > Thanks, Joel, yes, but as far as I'm aware these would all require the Python programme to have the user's username and password (or "credentials"), which I wanted to avoid. > > > > No matter what you do, your web service is going to have to > > authenticate with the remote web site. The details of that > > authentication are going to vary with each remote web site you want to > > connect to. > > > > -- > > Jerry Hmm, from the previous posts I get the impression that I could best solve this by asking the user for the specific combination of username, password and URL + promising not to keep any of that... OK, that does sound doable - thank you all Bob
[toc] | [prev] | [next] | [standalone]
| From | Joel Goldstick <joel.goldstick@gmail.com> |
|---|---|
| Date | 2012-09-21 10:15 -0400 |
| Message-ID | <mailman.1014.1348236929.27098.python-list@python.org> |
| In reply to | #29631 |
On Fri, Sep 21, 2012 at 9:58 AM, BobAalsma <overhaalsgang_24_bob@me.com> wrote: > Op vrijdag 21 september 2012 15:36:11 UTC+2 schreef Jerry Hill het volgende: >> On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote: >> >> > Thanks, Joel, yes, but as far as I'm aware these would all require the Python programme to have the user's username and password (or "credentials"), which I wanted to avoid. >> >> >> >> No matter what you do, your web service is going to have to >> >> authenticate with the remote web site. The details of that >> >> authentication are going to vary with each remote web site you want to >> >> connect to. >> >> >> >> -- >> >> Jerry > > Hmm, from the previous posts I get the impression that I could best solve this by asking the user for the specific combination of username, password and URL + promising not to keep any of that... > > OK, that does sound doable - thank you all I recommend that you write your program to read pages that are not protected. Once you get that working, you can go back and figure out how you want to get the username/password from your 'friends' and add that in. Also look up Beautiful Soup (version 4) for a great library to parse the pages that you retrieve > > Bob > -- > http://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick
[toc] | [prev] | [next] | [standalone]
| From | BobAalsma <overhaalsgang_24_bob@me.com> |
|---|---|
| Date | 2012-10-01 07:19 -0700 |
| Message-ID | <4be2f2ac-c061-48d7-baf1-212e28f2f5ec@googlegroups.com> |
| In reply to | #29639 |
Op vrijdag 21 september 2012 16:15:30 UTC+2 schreef Joel Goldstick het volgende: > On Fri, Sep 21, 2012 at 9:58 AM, BobAalsma wrote: > > > Op vrijdag 21 september 2012 15:36:11 UTC+2 schreef Jerry Hill het volgende: > > >> On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote: > > >> > > >> > Thanks, Joel, yes, but as far as I'm aware these would all require the Python programme to have the user's username and password (or "credentials"), which I wanted to avoid. > > >> > > >> > > >> > > >> No matter what you do, your web service is going to have to > > >> > > >> authenticate with the remote web site. The details of that > > >> > > >> authentication are going to vary with each remote web site you want to > > >> > > >> connect to. > > >> > > >> > > >> > > >> -- > > >> > > >> Jerry > > > > > > Hmm, from the previous posts I get the impression that I could best solve this by asking the user for the specific combination of username, password and URL + promising not to keep any of that... > > > > > > OK, that does sound doable - thank you all > > > > > > I recommend that you write your program to read pages that are not > > protected. Once you get that working, you can go back and figure out > > how you want to get the username/password from your 'friends' and add > > that in. Also look up Beautiful Soup (version 4) for a great library > > to parse the pages that you retrieve > > > > > > Bob > > > -- > > > http://mail.python.org/mailman/listinfo/python-list > > > > > > > > -- > > Joel Goldstick Joel, I've spent some time with this but don't really understand my results - some help would be appreciated. I've built a tester that will read my LinkedIn home page, which is password protected. When I use that method for reading other people's pages, the program is redirected to the LinkedIn login page. When I paste the URLs for the other people's pages in any browser, the requested pages are shown. Bob
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2012-10-02 09:17 -0700 |
| Message-ID | <33028bcf-9e6e-4460-81d8-4a86de763cf5@googlegroups.com> |
| In reply to | #30605 |
On Monday, 1 October 2012 19:49:27 UTC+5:30, BobAalsma wrote: > Op vrijdag 21 september 2012 16:15:30 UTC+2 schreef Joel Goldstick het volgende: > > > On Fri, Sep 21, 2012 at 9:58 AM, BobAalsma wrote: > > > > > > > Op vrijdag 21 september 2012 15:36:11 UTC+2 schreef Jerry Hill het volgende: > > > > > > >> On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote: > > > > > > >> > > > > > > >> > Thanks, Joel, yes, but as far as I'm aware these would all require the Python programme to have the user's username and password (or "credentials"), which I wanted to avoid. > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > >> No matter what you do, your web service is going to have to > > > > > > >> > > > > > > >> authenticate with the remote web site. The details of that > > > > > > >> > > > > > > >> authentication are going to vary with each remote web site you want to > > > > > > >> > > > > > > >> connect to. > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > >> -- > > > > > > >> > > > > > > >> Jerry > > > > > > > > > > > > > > Hmm, from the previous posts I get the impression that I could best solve this by asking the user for the specific combination of username, password and URL + promising not to keep any of that... > > > > > > > > > > > > > > OK, that does sound doable - thank you all > > > > > > > > > > > > > > > > > > I recommend that you write your program to read pages that are not > > > > > > protected. Once you get that working, you can go back and figure out > > > > > > how you want to get the username/password from your 'friends' and add > > > > > > that in. Also look up Beautiful Soup (version 4) for a great library > > > > > > to parse the pages that you retrieve > > > > > > > > > > > > > > Bob > > > > > > > -- > > > > > > > http://mail.python.org/mailman/listinfo/python-list > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Joel Goldstick > > > > Joel, > > > > I've spent some time with this but don't really understand my results - some help would be appreciated. > > I've built a tester that will read my LinkedIn home page, which is password protected. > > When I use that method for reading other people's pages, the program is redirected to the LinkedIn login page. > > When I paste the URLs for the other people's pages in any browser, the requested pages are shown. > > > > Bob Not all the authentication information is in the URL. Some of it is in cookies in the browser.
[toc] | [prev] | [next] | [standalone]
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Date | 2012-09-21 16:33 +0200 |
| Message-ID | <mailman.1017.1348238102.27098.python-list@python.org> |
| In reply to | #29631 |
BobAalsma wrote: > Hmm, from the previous posts I get the impression that I could best solve > this by asking the user for the specific combination of username, password > and URL + promising not to keep any of that... > > OK, that does sound doable - thank you all Hmm, promising seems doable, but keeping?
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2012-09-21 16:09 -0400 |
| Message-ID | <mailman.1033.1348258203.27098.python-list@python.org> |
| In reply to | #29629 |
On Fri, 21 Sep 2012 09:36:08 -0400, Jerry Hill <malaclypse2@gmail.com>
declaimed the following in gmane.comp.python.general:
> On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma <overhaalsgang_24_bob@me.com> wrote:
> > Thanks, Joel, yes, but as far as I'm aware these would all require the Python programme to have the user's username and password (or "credentials"), which I wanted to avoid.
>
> No matter what you do, your web service is going to have to
> authenticate with the remote web site. The details of that
> authentication are going to vary with each remote web site you want to
> connect to.
Hmmm, convoluted but presuming the "login" third party site uses
cookies... Would it be possible to use Javascript on the client "copy"
the HTML from the third-party and then transmit it to the application
rather than having the application trying to do a direct fetch given
just the URL?
This should keep the authentication local to the client machine.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
[toc] | [prev] | [next] | [standalone]
| From | BobAalsma <overhaalsgang_24_bob@me.com> |
|---|---|
| Date | 2012-09-22 04:38 -0700 |
| Message-ID | <6c7b7ada-1bc7-4eff-abba-301c6c3f2258@googlegroups.com> |
| In reply to | #29671 |
Op vrijdag 21 september 2012 22:10:04 UTC+2 schreef Dennis Lee Bieber het volgende: > On Fri, 21 Sep 2012 09:36:08 -0400, Jerry Hill > > declaimed the following in gmane.comp.python.general: > > > > > On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote: > > > > Thanks, Joel, yes, but as far as I'm aware these would all require the Python programme to have the user's username and password (or "credentials"), which I wanted to avoid. > > > > > > No matter what you do, your web service is going to have to > > > authenticate with the remote web site. The details of that > > > authentication are going to vary with each remote web site you want to > > > connect to. > > > > Hmmm, convoluted but presuming the "login" third party site uses > > cookies... Would it be possible to use Javascript on the client "copy" > > the HTML from the third-party and then transmit it to the application > > rather than having the application trying to do a direct fetch given > > just the URL? > > > > This should keep the authentication local to the client machine. > > > > > > -- > > Wulfraed Dennis Lee Bieber AF6VN > > wlfraed@....com HTTP://wlfraed.home.netcom.com/ Wulfraed, yes, as with David's proposal: this sounds good, but I wouldn't know the first thing about Javascript... I'm also concerned that both solutions would seem to imply distributing software (or "software") to the clients systems. Hmm. Bob
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2012-09-22 11:18 -0400 |
| Message-ID | <mailman.1082.1348327100.27098.python-list@python.org> |
| In reply to | #29741 |
On Sat, 22 Sep 2012 04:38:08 -0700 (PDT), BobAalsma
<overhaalsgang_24_bob@me.com> declaimed the following in
gmane.comp.python.general:
>
> Wulfraed, yes, as with David's proposal: this sounds good, but I wouldn't know the first thing about Javascript...
> I'm also concerned that both solutions would seem to imply distributing software (or "software") to the clients systems.
> Hmm.
>
Unless your clients are running some ancient text-only browser, they
already have the Javascript interpreter running. We aren't talking about
downloading a Java program that then runs as a process on the client's
machine. If your client's ever visit (since I have it up at the moment)
the Amazon forum pages, they are already running Javascript pages.
Here's the start of the page source as an example (don't ask me what
it does):
<html>
<head>
<script type="text/javascript">/* <![CDATA[ */var ue_t0=ue_t0||+new
Date();/* ]]> */</script>
<script type='text/javascript'>/* <![CDATA[ */
var ue_wl_jserr = 1,
ue_csm = window;
(function(a){a.ue_err={ec:0,pec:0,ts:0,erl:[],mxe:50,startTimer:function(){a.ue_err.ts++;setInterval(function(){a.ue&&(a.ue_err.pec<a.ue_err.ec)&&a.uex("at");a.ue_err.pec=a.ue_err.ec},10000)}};a.ueLogError=(function(){function
b(c,e,d){if(a.ue_err.ec>a.ue_err.mxe){return}a.ue_err.ec++;a.ue.log({m:c,f:e,l:d,s:""},"jserr");return
false}if(a.ue_wl_jserr){window.onerror=b}return
function(c){if(a.ue_err.ec>a.ue_err.mxe){return}a.ue_err.ec++;a.ue_err.erl.push(c)}})()})(ue_csm);
/* ]]> */</script>
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
[toc] | [prev] | [next] | [standalone]
| From | BobAalsma <overhaalsgang_24_bob@me.com> |
|---|---|
| Date | 2012-09-22 04:38 -0700 |
| Message-ID | <mailman.1074.1348313892.27098.python-list@python.org> |
| In reply to | #29671 |
Op vrijdag 21 september 2012 22:10:04 UTC+2 schreef Dennis Lee Bieber het volgende: > On Fri, 21 Sep 2012 09:36:08 -0400, Jerry Hill > > declaimed the following in gmane.comp.python.general: > > > > > On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote: > > > > Thanks, Joel, yes, but as far as I'm aware these would all require the Python programme to have the user's username and password (or "credentials"), which I wanted to avoid. > > > > > > No matter what you do, your web service is going to have to > > > authenticate with the remote web site. The details of that > > > authentication are going to vary with each remote web site you want to > > > connect to. > > > > Hmmm, convoluted but presuming the "login" third party site uses > > cookies... Would it be possible to use Javascript on the client "copy" > > the HTML from the third-party and then transmit it to the application > > rather than having the application trying to do a direct fetch given > > just the URL? > > > > This should keep the authentication local to the client machine. > > > > > > -- > > Wulfraed Dennis Lee Bieber AF6VN > > wlfraed@....com HTTP://wlfraed.home.netcom.com/ Wulfraed, yes, as with David's proposal: this sounds good, but I wouldn't know the first thing about Javascript... I'm also concerned that both solutions would seem to imply distributing software (or "software") to the clients systems. Hmm. Bob
[toc] | [prev] | [next] | [standalone]
| From | BobAalsma <overhaalsgang_24_bob@me.com> |
|---|---|
| Date | 2012-09-21 06:31 -0700 |
| Message-ID | <mailman.1007.1348234300.27098.python-list@python.org> |
| In reply to | #29628 |
Op vrijdag 21 september 2012 15:23:14 UTC+2 schreef Joel Goldstick het volgende: > On Fri, Sep 21, 2012 at 8:57 AM, BobAalsma wrote: > > > I'd like to write a programme that will be offered as a web service (Django), in which the user will point to a specific URL and the programme will be used to read the text of that URL. > > > > > > This text can be behind a username/password, but for several reasons, I don't want to know those. > > > > > > So I would like to set up a situation where the user logs in (if/when appropriate), points out the URL to my programme and my programme would then be able to read that particular text. > > > > > > I'm aware this may sound fishy. It should not be: I want the user to be fully aware and in control of this process. > > > > > > Any thoughts on how to approach this? > > > > There are several python modules to get web pages. urllib, urllib2 > > and another called requests. > > (http://kennethreitz.com/requests-python-http-module.html) Check > > those out > > > > > > Best regards, > > > Bob > > > -- > > > http://mail.python.org/mailman/listinfo/python-list > > > > > > > > -- > > Joel Goldstick Thanks, Joel, yes, but as far as I'm aware these would all require the Python programme to have the user's username and password (or "credentials"), which I wanted to avoid.
[toc] | [prev] | [next] | [standalone]
| From | David Smith <davids@invtools.com> |
|---|---|
| Date | 2012-09-21 11:28 -0400 |
| Message-ID | <mailman.1019.1348241281.27098.python-list@python.org> |
| In reply to | #29624 |
On 2012-09-21 08:57, BobAalsma wrote: > This text can be behind a username/password, but for several reasons, I don't want to know those. > > So I would like to set up a situation where the user logs in (if/when appropriate), points out the URL to my programme and my programme would then be able to read that particular text. I do this from a bat file that I will later translate to Python. I tell my work wiki which file I want. I use chrome, so for every new session I'm asked for my credentials. However, that is all transparent to my bat file. For that matter, when I download a new build from part of another bat file, I use Firefox and never see the credential exchange. I wouldn't expect any different behavior using Python.
[toc] | [prev] | [next] | [standalone]
| From | BobAalsma <overhaalsgang_24_bob@me.com> |
|---|---|
| Date | 2012-09-22 04:34 -0700 |
| Message-ID | <fe7c1bf7-2dc6-4746-b1d9-a50c42510e6b@googlegroups.com> |
| In reply to | #29648 |
Op vrijdag 21 september 2012 17:28:02 UTC+2 schreef David Smith het volgende: > On 2012-09-21 08:57, BobAalsma wrote: > > > This text can be behind a username/password, but for several reasons, I don't want to know those. > > > > > > So I would like to set up a situation where the user logs in (if/when appropriate), points out the URL to my programme and my programme would then be able to read that particular text. > > I do this from a bat file that I will later translate to Python. > > I tell my work wiki which file I want. I use chrome, so for every new > > session I'm asked for my credentials. However, that is all transparent > > to my bat file. > > > > For that matter, when I download a new build from part of another bat > > file, I use Firefox and never see the credential exchange. > > > > I wouldn't expect any different behavior using Python. Umm, David, sorry, you've lost me but I think this could be a good solution - at least the division in client side/server side sounds like what I'm looking for. Could you please elaborate? Bob
[toc] | [prev] | [next] | [standalone]
| From | BobAalsma <overhaalsgang_24_bob@me.com> |
|---|---|
| Date | 2012-09-22 04:34 -0700 |
| Message-ID | <mailman.1073.1348313653.27098.python-list@python.org> |
| In reply to | #29648 |
Op vrijdag 21 september 2012 17:28:02 UTC+2 schreef David Smith het volgende: > On 2012-09-21 08:57, BobAalsma wrote: > > > This text can be behind a username/password, but for several reasons, I don't want to know those. > > > > > > So I would like to set up a situation where the user logs in (if/when appropriate), points out the URL to my programme and my programme would then be able to read that particular text. > > I do this from a bat file that I will later translate to Python. > > I tell my work wiki which file I want. I use chrome, so for every new > > session I'm asked for my credentials. However, that is all transparent > > to my bat file. > > > > For that matter, when I download a new build from part of another bat > > file, I use Firefox and never see the credential exchange. > > > > I wouldn't expect any different behavior using Python. Umm, David, sorry, you've lost me but I think this could be a good solution - at least the division in client side/server side sounds like what I'm looking for. Could you please elaborate? Bob
[toc] | [prev] | [next] | [standalone]
| From | Thomas Jollans <t@jollybox.de> |
|---|---|
| Date | 2012-09-22 14:01 +0200 |
| Message-ID | <mailman.1076.1348315298.27098.python-list@python.org> |
| In reply to | #29624 |
On 09/21/2012 02:57 PM, BobAalsma wrote: > I'd like to write a programme that will be offered as a web service (Django), in which the user will point to a specific URL and the programme will be used to read the text of that URL. > > This text can be behind a username/password, but for several reasons, I don't want to know those. > > So I would like to set up a situation where the user logs in (if/when appropriate), points out the URL to my programme and my programme would then be able to read that particular text. > > I'm aware this may sound fishy. It should not be: I want the user to be fully aware and in control of this process. > > Any thoughts on how to approach this? What services are you planning to interface with? Many services (twitter being a notable pioneer) have systems for external (web) applications to log in without being given a user's username & password. I think it's possible to load a page in an iframe and access it using JavaScript/DOM from the parent page. This is probably what you'll want to do. You say you don't know the first thing about JavaScript. Well, my friend, if you're developing for the web, learn JavaScript, or, depending on your situation, hire a front end developer who knows JavaScript. You can only do so much on the web without using JavaScript. I recently discovered this guide to learning JS; it sounds reasonable: http://javascriptissexy.com/how-to-learn-javascript-properly/ http://pyjs.org/ may be worth a look too. -- Thomas PS: Most of your messages appear to be both To: and Cc: this list. Please stop sending each message twice, it's rather distracting.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web