Re: How to get the redirected URL only but not the actual content?
On 2 December 2017 at 03:32, Peng Yu wrote: > Where is `?reload=true` from? How to just get the redict URL that one > would get from the browser? Thanks. > >> 'http://ieeexplore.ieee.org:80/document/771073/?reload=true' The reload=true comes because http://ieeexplore.ieee.org/document/771073/ is itself redirected to that location: >curl -I http://ieeexplore.ieee.org/document/771073/ HTTP/1.1 302 Moved Temporarily Date: Sat, 02 Dec 2017 10:25:58 GMT Location: http://ieeexplore.ieee.org:80/document/771073/?reload=true Set-Cookie: JSESSIONID=YewWwt7dRSRhQWpfvW_L_pCovlFPKnyDULFtYJGxwvaIvmv8-RK-!-1840538570; path=/; HttpOnly;HttpOnly Set-Cookie: ERIGHTS=null; domain=ieeexplore.ieee.org; expires=Thu, 01-Jan-1970 01:00:00 GMT; path=/;HttpOnly Set-Cookie: ipCheck=109.154.64.43; domain=ieeexplore.ieee.org; path=/;HttpOnly Set-Cookie: ipCheck=109.154.64.43; domain=ieeexplore.ieee.org; path=/;HttpOnly Set-Cookie: cookieCheck=true; domain=ieeexplore.ieee.org; path=/;HttpOnly X-XSS-Protection: 1 Set-Cookie: WLSESSION=186802828.20480.; expires=Sun, 03-Dec-2017 10:25:58 GMT; path=/; Httponly Set-Cookie: TS011813a0=012f350623b6ced9dc5148879303ea57ba3f9321e686d26e43e83dddc173810cbaa92efa0046e79b1666b3f14f416143c59004edd9a10f9c23f67089ad348420304ac91dcfd756c69a4bbb7c0afe436aadb111a234; Path=/ Set-Cookie: TS01d430e1=012f3506230b0f867dbbdc2d8cd9812cc6cda6004b86d26e43e83dddc173810cbaa92efa00939a6282cc7ad5b9b80ddea276f6b5409df42e43a52ed561e1234df4ab341c2f3974c06b59548aab1e30a871ec4efc9bba1a756faf9076574ae4a4f67b57fa79856f016141e55bb9497d8dc4bbd4037c; path=/; domain=ieeexplore.ieee.org Transfer-Encoding: chunked Paul -- https://mail.python.org/mailman/listinfo/python-list
Re: How to get the redirected URL only but not the actual content?
Paul Moore wrote: > On 2 December 2017 at 03:32, Peng Yu wrote: >> Where is `?reload=true` from? How to just get the redict URL that one >> would get from the browser? Thanks. >> >>> 'http://ieeexplore.ieee.org:80/document/771073/?reload=true' > > The reload=true comes because > http://ieeexplore.ieee.org/document/771073/ is itself redirected to > that location: > >>curl -I http://ieeexplore.ieee.org/document/771073/ > HTTP/1.1 302 Moved Temporarily > Date: Sat, 02 Dec 2017 10:25:58 GMT > Location: http://ieeexplore.ieee.org:80/document/771073/?reload=true > Set-Cookie: > JSESSIONID=YewWwt7dRSRhQWpfvW_L_pCovlFPKnyDULFtYJGxwvaIvmv8- RK-!-1840538570; > path=/; HttpOnly;HttpOnly Set-Cookie: ERIGHTS=null; > domain=ieeexplore.ieee.org; expires=Thu, 01-Jan-1970 01:00:00 GMT; > path=/;HttpOnly Set-Cookie: ipCheck=109.154.64.43; > domain=ieeexplore.ieee.org; path=/;HttpOnly Set-Cookie: > ipCheck=109.154.64.43; domain=ieeexplore.ieee.org; path=/;HttpOnly > Set-Cookie: cookieCheck=true; domain=ieeexplore.ieee.org; path=/;HttpOnly > X-XSS-Protection: 1 Set-Cookie: WLSESSION=186802828.20480.; > expires=Sun, 03-Dec-2017 10:25:58 GMT; path=/; Httponly > Set-Cookie: > TS011813a0=012f350623b6ced9dc5148879303ea57ba3f9321e686d26e43e83dddc173810cbaa92efa0046e79b1666b3f14f416143c59004edd9a10f9c23f67089ad348420304ac91dcfd756c69a4bbb7c0afe436aadb111a234; > Path=/ Set-Cookie: > TS01d430e1=012f3506230b0f867dbbdc2d8cd9812cc6cda6004b86d26e43e83dddc173810cbaa92efa00939a6282cc7ad5b9b80ddea276f6b5409df42e43a52ed561e1234df4ab341c2f3974c06b59548aab1e30a871ec4efc9bba1a756faf9076574ae4a4f67b57fa79856f016141e55bb9497d8dc4bbd4037c; > path=/; domain=ieeexplore.ieee.org Transfer-Encoding: chunked But why don't you see that in the browser? The server probably gives a user agent specific response. You may be able to "deceive" it with a library like mechanize (python2- only). -- https://mail.python.org/mailman/listinfo/python-list
Re: Pros and cons of Python sources?
Den 2017-11-29 skrev Martin Schöön : > Den 2017-11-28 skrev Cameron Simpson : >> On 28Nov2017 21:23, Martin Schöön wrote: >>>The reason I think all is not well is the fact that pip list no only >>>results in a list of packages but at the end of the list (which does >>>not look complete) there is a bunch of error messages. >> >> Please post them. Maybe someone has some insight. (Also post the pip command >> itself producing the messages.) >> > From pip.log: > > /usr/bin/pip run on Tue Nov 28 22:54:09 2017 > apptools (4.2.1) > apt-xapian-index (0.47) > arandr (0.1.7.1) > argparse (1.2.1) > Problem solved -- I think. Here is how: Going through all Python 2.7 packages in Synaptic (this is in Debian) I marked every package that did not seem to impact anything else plus python-pip for complete removal and went ahead and removed them. I then re-installed python-pip and whatever it felt it needed. After that I ran pip list -- no errors or warnings whatsoever! Finally I installed packages my laptop has but my desktop box now was missing. I have not tampered with my laptop so I think it should be an OK template for my Python packages. pip list is still OK and what little else I have tested also works. /Martin (a little wiser regarding Python and pip) -- https://mail.python.org/mailman/listinfo/python-list