823 Commits

Author SHA1 Message Date
James Lu
001b49b6c3 Wikifetch: prefer <link rel="canonical"> links again when available 2017-03-24 19:09:38 -07:00
James Lu
b9481184cb SedRegex: skip testBoldReplacement on Python 2
I don't know why it breaks here and I don't really care.
2017-03-21 13:21:40 -07:00
James Lu
5e77c65a5f SedRegex: remove a duplicate test 2017-03-21 13:14:06 -07:00
James Lu
b53e6e40a0 SedRegex: use self.__class__ instead of __class__ in tests (Python 2 compat) 2017-03-21 13:10:23 -07:00
James Lu
a58785fa4a SedRegex: add a bunch of test cases
Closes #53.
2017-03-21 12:58:12 -07:00
James Lu
491ff66c7e .travis.yml: quote echo arguments as well... 2017-03-21 11:27:27 -07:00
James Lu
a55ad36068 .travis.yml: quote args from last commit 2017-03-21 11:24:07 -07:00
James Lu
328d07af9a .travis.yml: skip Weather and LastFM tests (which require secure data) on pull requests 2017-03-21 11:05:32 -07:00
James Lu
65bb618662 .travis.yml: run tests for Weather again 2017-03-21 10:49:44 -07:00
James Lu
485dff4a8f .travis.yml: drop builds on Python 3.2/3.3 2017-03-18 23:54:38 -07:00
James Lu
d5f498bfcb Wikifetch: switch to a different article for testMediaWiki 2017-03-18 23:52:38 -07:00
seitzbg
40634dcdd5 PkgInfo: only match package names in 'centos --exact', instead of name + version strings
(cherry picked from 59cb273cb7)
2017-03-18 19:54:10 -07:00
James Lu
91cfa7acb0 Wikifetch: intelligently filter out <p> lines with little or no content
More specifically, this skips lines that have a lower word count than the search query (e.g. page titles, some navigation links).
This allows some pages on https://wiki.ubuntu.com/ to work, for example
2017-03-18 19:07:56 -07:00
James Lu
819fcc6c09 Wikifetch: add a --no-mw-parsing option in an attempt to support non-MediaWiki sites 2017-03-18 18:47:20 -07:00
James Lu
194ac4d7be Wikifetch: clarify _get_article_tree docstring 2017-03-18 18:23:00 -07:00
James Lu
54ecbe89b5 SupyMisc: unbutcher syntax description for 'mreplace' 2017-03-17 23:03:36 -07:00
James Lu
e0d3188719 Weather: add a locationsearch command to look up raw zmw codes 2017-03-09 19:41:26 -08:00
James Lu
a9d27f8bf6 Weather: move JSON decoding into _wunderjson() 2017-03-09 19:16:36 -08:00
James Lu
ba1eb6474b Weather: rewrite autocomplete code to support multiple results internally 2017-03-09 19:00:46 -08:00
James Lu
a8ebadc82e Weather: show a proper error if current conditions couldn't be found 2017-03-09 18:47:26 -08:00
James Lu
364f2d4f6a Weather: return raw ZMW codes as is in _wuac 2017-03-09 18:40:22 -08:00
James Lu
8bc77c8f63 MCInfo: more compact row iteration 2017-03-08 18:39:59 -08:00
James Lu
35e82ca785 LastFM: fix my email [skip ci] 2017-03-07 17:18:46 -08:00
James Lu
6cf19f67e2 .travis.yml: allow the nightly branch to fail 2017-02-23 18:03:05 -08:00
James Lu
5b9daa4a5f .travis.yml: remove fast_finish; it tends to flood web hooks 2017-02-23 18:01:21 -08:00
James Lu
67c40b5974 PkgInfo: skip 'archlinux' and 'archaur' tests; the servers very often time out! 2017-02-23 18:00:32 -08:00
James Lu
094b9a332d TranslateParty: strip IRC formatting to prevent text corruption
Closes #60.
2017-02-23 17:32:20 -08:00
James Lu
a9dfb1009d Wikifetch: add a three second timeout in fetch 2017-02-04 18:28:11 -08:00
James Lu
2fbfc37f98 Wikifetch: leave a fallback reply if paragraph parsing failed 2017-01-27 18:16:00 -08:00
James Lu
2bd06a39a9 Wikifetch: return the address in _get_article_tree as well 2017-01-27 18:10:52 -08:00
James Lu
18493a5e23 Wikifetch: revamp tests to be more complete
This now tests different combinations of --site, and tries to parse some other common wikis.
2017-01-27 18:01:13 -08:00
James Lu
100f503783 Wikifetch: support wikimedia.org and mediawiki.org 2017-01-27 18:00:48 -08:00
James Lu
8d586dad47 Wikifetch: fix NameError on redirect parsing 2017-01-27 17:38:37 -08:00
James Lu
5bf0bd6fd5 Wikifetch: bump copyright years 2017-01-27 17:32:20 -08:00
James Lu
9f1f04d25c Wikifetch: only show "possible results" in disambiguation pages if parsing succeeds 2017-01-27 17:25:43 -08:00
James Lu
d1eea2a0a4 Wikifetch: support disambiguation parsing on Wikia 2017-01-27 17:25:24 -08:00
James Lu
3ca87bb686 Wikifetch: abstract out article fetching, fix Wikia search support 2017-01-27 17:12:41 -08:00
James Lu
482a8dd1d9 Wikifetch: remove special case for articles about years
This isn't really relevant anymore, since most years on Wikipedia have an introductory paragraph describing them now.
2017-01-27 17:10:32 -08:00
James Lu
4d487dd0e0 Wikifetch: log the URL when fetching a link fails 2017-01-26 21:28:06 -08:00
James Lu
1e7bfed72e DDG: support !bang links (redirects) 2017-01-20 22:18:25 -08:00
James Lu
2db371a9fa DDG: rewrite _ddgurl() to return new and original request URLs
This uses utils.web.getUrlTargetAndContent(), which is specific to Limnoria and requires commit ProgVal/Limnoria@57b77a6725 or later
2017-01-20 22:18:21 -08:00
James Lu
0b0c1b59ab DDG: show all lines of multiline zeroclick replies
Thanks to @nathan0 for pointing this out.
2017-01-20 21:51:05 -08:00
James Lu
9d76e56a33 .travis.yml: replace 3.5-dev with 3.6 2017-01-20 19:09:21 -08:00
James Lu
1836cc7f90 LastFM: rewrite YouTube link search to use DDG's search_core()
This allows the LastFM plugin to share the same redirect expansion code as DDG (from commit 8187d51cef8a716f7b58d8e4521ebf37444f8fe0).
2017-01-20 19:04:07 -08:00
James Lu
4915b7713b DDG: actually, return a list of tuples in search_core()
This abstraction makes it easier for depending plugins to filter out the data they actually need.
2017-01-20 18:57:55 -08:00
James Lu
3729068633 DDG: fix a typo in comments 2017-01-20 18:51:10 -08:00
James Lu
7a6e2f9f97 DDG: rewrite to fix "max results" not working 2017-01-20 18:50:16 -08:00
James Lu
47bb74d7d9 DDG: abstract out a search_core(), as the LastFM plugin will use this later 2017-01-20 18:39:42 -08:00
James Lu
d332e73e48 DDG: make _ddgurl() a static method 2017-01-20 18:18:06 -08:00
James Lu
8187d51cef DDG: expand redirect links in search results
Some links on DuckDuckGo's site are now shown going through a redirect service.
These links are in the format "/l/?kh=-1&uddg=https%3A%2F%2Fduckduckgo.com%2F" instead of simply being "https://duckduckgo.com", and we should decode these here.
2017-01-20 18:14:07 -08:00