Chris Mayo
a92a684ac4
Run black on linkcheck/
2020-05-30 17:01:36 +01:00
Chris Mayo
1663e10fe7
Remove spaces after names in function definitions
...
This is a PEP 8 convention, E211.
2020-05-16 20:19:42 +01:00
Chris Mayo
025637b08d
Remove Python 2 cookielib import
2020-05-16 16:26:38 +01:00
Chris Mayo
b0ea72e8c1
Remove # -*- coding: lines
...
Except for tests that include non-unicode characters:
tests/test_po.py
tests/test_strformat.py
tests/test_url.py
tests/checker/test_error.py
tests/checker/test_news.py
2020-05-08 10:45:31 +01:00
Chris Mayo
a7b7e31917
Python3: fix TypeError when parsing cookie data
...
> fp = BytesIO(strheader)
E TypeError: a bytes-like object is required, not 'str'
linkcheck/cookies.py:61: TypeError
The email package provides the message_from_string() convenience
function which avoids the need to create a file-like object.
Indeed http.client.HTTPMessage is implemented using email.message.Message.
2019-09-13 20:10:25 +01:00
Petr Dlouhý
106d58c2da
Python3: use BytesIO instead of StringIO
2019-04-09 20:09:35 +01:00
Marius Gedminas
6f55f446ae
Load cookies from the --cookiefile correctly
...
requests.cookies.merge_cookies() requires a dict or a CookieJar as the second argument.
We've been passing lists of Cookie objects instead.
Fixes #62 , harder this time.
2018-03-16 13:23:26 +02:00
Petr Dlouhý
a1b300c892
Python3: fix imports
2018-01-19 09:52:43 +01:00
Bastian Kleineidam
7b34be590b
Introduce check plugins, use Python requests for http/s connections, and some code cleanups and improvements.
2014-03-01 00:12:34 +01:00
Bastian Kleineidam
c806be5c15
Updated copyright
2014-01-08 22:33:04 +01:00
Bastian Kleineidam
f3b435c2a6
Add missing docstrings.
2013-12-24 07:15:31 +01:00
Bastian Kleineidam
e0a2558b2b
Updated copyright.
2013-12-24 07:13:16 +01:00
Bastian Kleineidam
36badddfac
Update cookie code from Python module.
2013-12-04 19:05:08 +01:00
Bastian Kleineidam
63cf8adf54
Catch ValueError on invalid cookie expiration dates.
2012-10-10 06:44:38 +02:00
Bastian Kleineidam
3d831c1adb
Updated copyright.
2012-04-11 22:23:43 +02:00
Bastian Kleineidam
1a28c2e334
Detect invalid empty cookies.
2012-04-03 08:03:54 +02:00
Bastian Kleineidam
ef6a3b99af
Strip newline at end of cookie string.
2011-08-03 19:26:59 +02:00
Bastian Kleineidam
ee7e04c6c6
Remove unused function client_header_name()
2011-08-02 21:57:37 +02:00
Bastian Kleineidam
977d9e9ae6
Update cookie values instead of adding duplicate entries.
2011-08-01 20:26:31 +02:00
Bastian Kleineidam
4c71b5ba68
Use httplib cookie parsing; fix docs.
2011-05-14 13:56:38 +02:00
Bastian Kleineidam
eaa2b79bc3
Updated documentation.
2011-02-17 19:59:02 +01:00
Bastian Kleineidam
017a1087ba
Remove unneeded __future__ import
2010-11-21 10:45:30 +01:00
Bastian Kleineidam
25d75bd4a2
Added login URL posting.
2010-10-14 18:36:11 +02:00
Bastian Kleineidam
415efe262e
Added equality check for Cookies, and use that to augment the retrieved cookies.
2010-10-13 22:35:36 +02:00
Bastian Kleineidam
4e1b6d667e
Set copyright.
2010-03-26 20:51:59 +01:00
Bastian Kleineidam
c4c098bd83
pep8-ify the source a little more
2010-03-13 08:47:12 +01:00
Bastian Kleineidam
5e06b6b8d4
Updated FSF address in GPL blurb
2009-07-24 23:58:20 +02:00
Bastian Kleineidam
00c15eef6a
Minor code cleanups
2009-06-22 20:40:00 +02:00
calvin
e9805dbd8a
Updated copyright year to 2009
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3887 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2009-01-08 14:18:03 +00:00
calvin
7b2a21c133
Fix off-by-one error in cookie domain matching code.
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3850 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2008-07-13 12:52:11 +00:00
calvin
bacb59597e
Use relative imports from Python 2.5
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3750 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2008-05-09 06:16:03 +00:00
calvin
5d8bdaaa1f
Use generators instead of lists where possible
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3739 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2008-04-28 00:26:02 +00:00
calvin
3eac1be9ab
Require and use Python 2.5
...
Use Python 2.5 features and get rid of old compat code. Also some
code cleanups have been made.
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3737 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2008-04-27 11:39:21 +00:00
calvin
4ce0ddd166
Changes for future Python 3.x compatibility
...
Replace backticks with repr(), replace .has_key() with "in".
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3680 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2008-03-19 10:22:57 +00:00
calvin
6499cb1a63
updated copyright year
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3658 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2008-01-02 14:31:19 +00:00
calvin
6c07be042d
Add optional leading dot for cookie domain value
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3637 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2007-12-13 11:52:10 +00:00
calvin
fddf890bd4
Allow spaces in cookie values
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3636 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2007-12-13 11:44:18 +00:00
calvin
df48d4a905
bump up copyright year
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3534 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2007-01-01 14:57:38 +00:00
calvin
a57618a4ad
use relative imports
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3335 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2006-06-01 14:06:19 +00:00
calvin
06956060b5
added documentation
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3250 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2006-05-18 16:31:33 +00:00
calvin
75e88c062a
added --cookiefile option to set initial cookie values
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3210 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2006-05-16 20:56:34 +00:00
calvin
e8bf93bd90
inherit from StandardError, not from Exception
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3194 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2006-05-15 22:22:24 +00:00
calvin
f002c5f965
Replace the old threading algorithm with a new one based on Queue.Queue and consumer threads
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3146 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2006-05-13 13:44:52 +00:00
calvin
276437c7d8
syntax cleanup
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3067 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2006-02-09 07:57:22 +00:00
calvin
e92aee054c
updated copyright
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3010 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2006-01-03 19:12:47 +00:00
calvin
a24fd65943
always quote port value
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2992 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2005-12-19 14:08:34 +00:00
calvin
856ff8ef2a
assert debugs
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2987 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2005-12-18 08:55:42 +00:00
calvin
5eb3061ee0
added new cookie parsing
...
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2982 e7d03fd6-7b0d-0410-9947-9c21f3af8025
2005-12-18 08:18:32 +00:00