Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36470
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2013-01-08 18:54 -0800 |
| References | <b181f61b-c5c9-461a-9acc-8c79e257fae7@googlegroups.com> <dn4oe8hv6ulm6ea8edhr5luiir861f1u7q@invalid.netcom.com> <mailman.273.1357650704.2939.python-list@python.org> |
| Subject | Re: How to get the selected text of the webpage in chrome through python ? |
| From | iMath <redstone-cold@163.com> |
| Message-ID | <mailman.304.1357700573.2939.python-list@python.org> (permalink) |
在 2013年1月8日星期二UTC+8下午9时11分30秒,Dave Angel写道: > On 01/08/2013 07:38 AM, Dennis Lee Bieber wrote: > > > On Mon, 7 Jan 2013 20:20:28 -0800 (PST), iMath <redstone-cold@163.com> > > > declaimed the following in gmane.comp.python.general: > > > > > >> How to get the selected text of the webpage in chrome through python ? > > > Chrome is a browser, is it not... If you want to get the text in > > > Python, you have to write the equivalent of a browser -- something that > > > parses the returned HTML message, extracting the parts you want. > > > > To get a selection, you can either wait till it's copied to the > > clipboard, and get it from there, or you can write a addon for the > > application. Since Chrome accepts addons, I suggest you research that > > angle. Probably mozilla.org is the place to start, and function > > > > nsISelectionController::GetSelection() might be some place to examine. > > > > You might find some hints in > > http://stackoverflow.com/questions/2671474/range-selection-and-mozilla > > > > > > if you are going to work with the clipboard, realize that it works quite > > differently from one OS to another, and even from one desktop manager to > > another. > > > > -- > > > > DaveA It seems need Javascript to work it on . Unfortunately ,I am only familiar with python .
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to get the selected text of the webpage in chrome through python ? iMath <redstone-cold@163.com> - 2013-01-07 20:20 -0800
Re: How to get the selected text of the webpage in chrome through python ? iMath <redstone-cold@163.com> - 2013-01-08 02:52 -0800
Re: How to get the selected text of the webpage in chrome through python ? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-01-08 07:38 -0500
Re: How to get the selected text of the webpage in chrome through python ? Dave Angel <d@davea.name> - 2013-01-08 08:11 -0500
Re: How to get the selected text of the webpage in chrome through python ? iMath <redstone-cold@163.com> - 2013-01-08 18:54 -0800
Re: How to get the selected text of the webpage in chrome through python ? iMath <redstone-cold@163.com> - 2013-01-08 18:54 -0800
Re: How to get the selected text of the webpage in chrome through python ? Bruno Dupuis <lisael@lisael.org> - 2013-01-08 14:19 +0100
Re: How to get the selected text of the webpage in chrome through python ? iMath <redstone-cold@163.com> - 2013-01-08 18:47 -0800
Re: How to get the selected text of the webpage in chrome through python ? iMath <redstone-cold@163.com> - 2013-01-08 18:47 -0800
Re: How to get the selected text of the webpage in chrome through python ? Miki Tebeka <miki.tebeka@gmail.com> - 2013-01-08 06:01 -0800
Re: How to get the selected text of the webpage in chrome through python ? Alister <alister.ware@ntlworld.com> - 2013-01-09 09:35 +0000
Re: How to get the selected text of the webpage in chrome through python ? iMath <redstone-cold@163.com> - 2013-01-09 17:55 -0800
csiph-web