Re: Generate a Google Translate API token through the Socks5 proxy using gtoken.py
On Fri, 30 Jul 2021 13:17:50 +0200, Peter Otten <__pete...@web.de> declaimed the following: > >https://mail.python.org/pipermail/python-list/2021-July/902975.html > >You are now officially archived ;) Pity the choice was the boolean "X-No-Archive"... Consensus implementation of an "X-Expire-After: " would have been friendlier (Google Groups USED to expire X-No-Archive posts after a week, instead of the current practice of: post says no-archive, delete immediately). -- Wulfraed Dennis Lee Bieber AF6VN wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/ -- https://mail.python.org/mailman/listinfo/python-list
Re: Generate a Google Translate API token through the Socks5 proxy using gtoken.py
On 29/07/2021 17:43, Dennis Lee Bieber wrote: On Thu, 29 Jul 2021 15:45:26 +0200, Peter Otten <__pete...@web.de> declaimed the following: On 28/07/2021 18:40, Dennis Lee Bieber wrote: On Wed, 28 Jul 2021 09:04:40 +0200, Peter Otten <__pete...@web.de> declaimed the following: Perhaps it has something to do with the X-No-Archive flag set by Dennis? According to my properties page in Agent, I've turned that off except if the message I'm replying to has it set. I'm yet to see an archived post by you -- maybe that setting is overridden somewhere. And naturally, once I found the legacy (per persona) custom setting, I failed to edit the main persona. Hopefully this time it's set... https://mail.python.org/pipermail/python-list/2021-July/902975.html You are now officially archived ;) -- https://mail.python.org/mailman/listinfo/python-list
Re: Generate a Google Translate API token through the Socks5 proxy using gtoken.py
On Thu, 29 Jul 2021 15:45:26 +0200, Peter Otten <__pete...@web.de> declaimed the following: >On 28/07/2021 18:40, Dennis Lee Bieber wrote: >> On Wed, 28 Jul 2021 09:04:40 +0200, Peter Otten <__pete...@web.de> >> declaimed the following: >> >>> >>> Perhaps it has something to do with the X-No-Archive flag set by Dennis? >> >> According to my properties page in Agent, I've turned that off except >> if the message I'm replying to has it set. > >I'm yet to see an archived post by you -- maybe that setting is >overridden somewhere. And naturally, once I found the legacy (per persona) custom setting, I failed to edit the main persona. Hopefully this time it's set... Appears Agent added the per "folder" and "default' [x] X-no-Archive flags in some later release, and those are what I've been tweaking... But looking at the INI file, I found there were persona specific custom settings for "additional header fields", Which I likely set up back in the days of Agent 5 or so, currently on Agent 8 -- Wulfraed Dennis Lee Bieber AF6VN wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/ -- https://mail.python.org/mailman/listinfo/python-list
Re: Generate a Google Translate API token through the Socks5 proxy using gtoken.py
On 28/07/2021 18:40, Dennis Lee Bieber wrote: On Wed, 28 Jul 2021 09:04:40 +0200, Peter Otten <__pete...@web.de> declaimed the following: Perhaps it has something to do with the X-No-Archive flag set by Dennis? According to my properties page in Agent, I've turned that off except if the message I'm replying to has it set. I'm yet to see an archived post by you -- maybe that setting is overridden somewhere. -- https://mail.python.org/mailman/listinfo/python-list
Re: Generate a Google Translate API token through the Socks5 proxy using gtoken.py
On Wednesday, July 28, 2021 at 3:05:11 PM UTC+8, Peter Otten wrote: > On 28/07/2021 07:32, Cameron Simpson wrote: > > On 27Jul2021 19:24, Hongyi Zhao wrote: > >> On Wednesday, July 28, 2021 at 7:25:27 AM UTC+8, cameron...@gmail.com > >> wrote: > >>> Just to follow on a bit to Dennis: > >> > >> But I can't any reply from Dennis in this issue. > > > > Odd, because I replied to his reply to you :-) > Perhaps it has something to do with the X-No-Archive flag set by Dennis? I'm not sure. I use the Google Groups from Firefox for reading from/posting on this group. HY -- https://mail.python.org/mailman/listinfo/python-list
Re: Generate a Google Translate API token through the Socks5 proxy using gtoken.py
On 28/07/2021 07:32, Cameron Simpson wrote: On 27Jul2021 19:24, Hongyi Zhao wrote: On Wednesday, July 28, 2021 at 7:25:27 AM UTC+8, cameron...@gmail.com wrote: Just to follow on a bit to Dennis: But I can't any reply from Dennis in this issue. Odd, because I replied to his reply to you :-) Perhaps it has something to do with the X-No-Archive flag set by Dennis? -- https://mail.python.org/mailman/listinfo/python-list
Re: Generate a Google Translate API token through the Socks5 proxy using gtoken.py
On 27Jul2021 19:24, Hongyi Zhao wrote: >On Wednesday, July 28, 2021 at 7:25:27 AM UTC+8, cameron...@gmail.com wrote: >> Just to follow on a bit to Dennis: > >But I can't any reply from Dennis in this issue. Odd, because I replied to his reply to you :-) If you're using a threaded view of the list, his reply should be right before mine. If you're not, it was about 6 hours before my reply. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list
Re: Generate a Google Translate API token through the Socks5 proxy using gtoken.py
On Wednesday, July 28, 2021 at 7:25:27 AM UTC+8, cameron...@gmail.com wrote: > Just to follow on a bit to Dennis: But I can't any reply from Dennis in this issue. > C:\Users\Wulfraed\Documents\_Hg-Repositories\Python Progs>python > googletrans_test.py > Traceback (most recent call last): > File "googletrans_test.py", line 4, in > tk = acquirer.do(text) > File "C:\Python38\lib\site-packages\googletrans\gtoken.py", line 194, in do > self._update() > File "C:\Python38\lib\site-packages\googletrans\gtoken.py", line 62, in > _update > code = self.RE_TKK.search(r.text).group(1).replace('var ', '') > AttributeError: 'NoneType' object has no attribute 'group' > The implication here is that: > > self.RE_TKK.search(r.text).group(1) > > generates the error because: > > self.RE_TKK.search(r.text) > > returned None instead of a regular expression match object. That means > that "r.text" way not what was expected. > > Like Dennis, i note the remark "for internal use only", suggesting this > was some internal Google code for doing something fiddly. It may not be > the best thing for what you're trying to do. > > WRT to a socks proxy, Dennis showed that the issue occurs even without a > proxy. I would advocate doing all your debugging without trying to use > socks, then get to going through a socks proxy _after_ the main stuff is > working. > > Cheers, > Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list
Re: Generate a Google Translate API token through the Socks5 proxy using gtoken.py
Just to follow on a bit to Dennis: C:\Users\Wulfraed\Documents\_Hg-Repositories\Python Progs>python googletrans_test.py Traceback (most recent call last): File "googletrans_test.py", line 4, in tk = acquirer.do(text) File "C:\Python38\lib\site-packages\googletrans\gtoken.py", line 194, in do self._update() File "C:\Python38\lib\site-packages\googletrans\gtoken.py", line 62, in _update code = self.RE_TKK.search(r.text).group(1).replace('var ', '') AttributeError: 'NoneType' object has no attribute 'group' The implication here is that: self.RE_TKK.search(r.text).group(1) generates the error because: self.RE_TKK.search(r.text) returned None instead of a regular expression match object. That means that "r.text" way not what was expected. Like Dennis, i note the remark "for internal use only", suggesting this was some internal Google code for doing something fiddly. It may not be the best thing for what you're trying to do. WRT to a socks proxy, Dennis showed that the issue occurs even without a proxy. I would advocate doing all your debugging without trying to use socks, then get to going through a socks proxy _after_ the main stuff is working. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list