Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80529 > unrolled thread
| Started by | Larry Martell <larry.martell@gmail.com> |
|---|---|
| First post | 2014-11-11 10:48 -0500 |
| Last post | 2014-11-11 17:33 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
Communicating with a PHP script (and pretending I'm a browser) Larry Martell <larry.martell@gmail.com> - 2014-11-11 10:48 -0500
Re: Communicating with a PHP script (and pretending I'm a browser) Denis McMahon <denismfmcmahon@gmail.com> - 2014-11-11 17:33 +0000
| From | Larry Martell <larry.martell@gmail.com> |
|---|---|
| Date | 2014-11-11 10:48 -0500 |
| Subject | Communicating with a PHP script (and pretending I'm a browser) |
| Message-ID | <mailman.15667.1415720928.18130.python-list@python.org> |
I have a PHP app that I want to convert to django. But I want to do it stages. All the heavy lifting is in the PHP code, so first, I want to just use templates and views to generate the HTML, but still call the PHP code. Then later convert the PHP to python. My issue is that the PHP code expects to get all it's input from the REQUEST object and I've consumed that in the view. Is there any way I can somehow supply that to the PHP code? Is there some way python can communicate like curl ... it needs to send the request string in the body of a POST request to the URL that will route to the PHP script and get the output back.
[toc] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2014-11-11 17:33 +0000 |
| Message-ID | <m3th9c$vod$1@dont-email.me> |
| In reply to | #80529 |
On Tue, 11 Nov 2014 10:48:41 -0500, Larry Martell wrote: > Is there some way python can communicate like curl ... it needs to send > the request string in the body of a POST request to the URL that will > route to the PHP script and get the output back. http://www.lmgtfy.com/?q=python+http+request and perhaps http://www.lmgtfy.com/?q=python+parse+html Personally I think last time I wanted to do we scraping in python I used requests and beautifulsoup, but ymmv. -- Denis McMahon, denismfmcmahon@gmail.com
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web