several changes to make travis build work

- fixed html.unescape not being available on Python3.3
- removed inconsistent test result
- added username/password pairs for authenticating extractors
This commit is contained in:
Mike Fährmann
2017-01-10 13:41:00 +01:00
parent cfe5bf732a
commit 00074a71d7
3 changed files with 26 additions and 8 deletions

View File

@@ -18,7 +18,6 @@ class InfinitychanThreadExtractor(chan.ChanThreadExtractor):
test = [("https://8ch.net/wh40k/res/1.html", {
"url": "9220c79950d3f9cdd2c0436e816aec6b8342fac1",
"keyword": "df5773339c5864c71b63fc26ca60ea7098b83cb1",
"content": "0533b95bee50c616e3c1a8c50e4087e170cfd950",
})]
api_url = "https://8ch.net/{board}/res/{thread}.json"
file_url = "https://media.8ch.net/{board}/src/{tim}{ext}"

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2015, 2016 Mike Fährmann
# Copyright 2015-2017 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -113,4 +113,8 @@ else:
unquote = urllib.parse.unquote
unescape = html.unescape
try:
unescape = html.unescape
except AttributeError:
import html.parse
unescape = html.parse.HTMLParser().unescape