Commit Graph

11456 Commits

Author SHA1 Message Date
James Lu
e44083f9a5 Update my email & repo link references
From: 2ae51939b3
2020-05-15 11:19:32 -07:00
James Lu
c99353106e Annotate READMEs with BeautifulSoup dependencies
From: a80a19564c
2020-05-15 11:19:32 -07:00
James Lu
8689345f74 DDG: remove zeroclick from plugin readme
[skip ci]

From: 3ab4ba16dc
2020-05-15 11:19:32 -07:00
James Lu
c73542fb3f DDG: remove the 'zeroclick' command
The IRC output is poorly formatted, and doesn't yield useful results most of the time anyways.

From: cdf6c7eb3e
2020-05-15 11:19:32 -07:00
James Lu
e4d16257b6 DDG: support !bang links (redirects)
From: 1e7bfed72e
2020-05-15 11:19:32 -07:00
James Lu
ba04480405 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

From: 2db371a9fa
2020-05-15 11:19:32 -07:00
James Lu
53318d142c DDG: show all lines of multiline zeroclick replies
Thanks to @nathan0 for pointing this out.

From: 0b0c1b59ab
2020-05-15 11:19:32 -07:00
James Lu
f5a53a1965 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.

From: 4915b7713b
2020-05-15 11:19:32 -07:00
James Lu
828112eaa1 DDG: fix a typo in comments
From: 3729068633
2020-05-15 11:19:32 -07:00
James Lu
48b5016f41 DDG: rewrite to fix "max results" not working
From: 7a6e2f9f97
2020-05-15 11:19:32 -07:00
James Lu
30615a7284 DDG: abstract out a search_core(), as the LastFM plugin will use this later
From: 47bb74d7d9
2020-05-15 11:19:32 -07:00
James Lu
44b626df64 DDG: make _ddgurl() a static method
From: d332e73e48
2020-05-15 11:19:32 -07:00
James Lu
c92bc0ca0c 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.

From: 8187d51cef
2020-05-15 11:19:32 -07:00
James Lu
98600b26e8 DDG: fix wrong command name in README
[skip ci]
From: 22a4fb457d
2020-05-15 11:19:32 -07:00
James Lu
1806646be2 plugins: update my email
From: 177eefa0a3
2020-05-15 11:19:32 -07:00
James Lu
f9b83ac2de DDG: log search URL to DEBUG
From: 5431f25e0a
2020-05-15 11:19:32 -07:00
James Lu
950aec696e DDG: remove broken error catching (irc isn't in the _ddgurl namespace)
From: 52ec05a041
2020-05-15 11:19:32 -07:00
James Lu
35677548df DDG: strip Sponsored links from search results
From: e9edceb735
2020-05-15 11:19:32 -07:00
Valentin Lorentz
f8a14547f9 Google: Update regexp. 2020-05-15 19:56:36 +02:00
Valentin Lorentz
ddce09d257 Rename supybot.reply.format.databaseRecord to supybot.replies.databaseRecord. 2020-05-15 19:08:43 +02:00
Valentin Lorentz
376917b1b8 Fediverse: Show attachment URLs. 2020-05-15 18:51:19 +02:00
Valentin Lorentz
3d1e88cb68 safeEval: Get rid of eval().
It should be safe considering the AST sanity checks,
but I don't see any point in keeping it.
2020-05-15 18:31:04 +02:00
Valentin Lorentz
6f4e3a2dbd QuoteGrabs: Add support for +draft/reply to point to the message to grab. 2020-05-15 18:17:34 +02:00
Valentin Lorentz
a54db1034f Fix Python 3.4 support. 2020-05-14 21:49:56 +02:00
Valentin Lorentz
eaf7222509 Fediverse: Cache host support for webfinger before snarfing.
This is much cheaper both for us and the host if the host
doesn't support activitypub at all (which is what happens
most of the time).
2020-05-14 21:33:34 +02:00
Valentin Lorentz
566920070c Fix regressions in 4046a1b201. 2020-05-14 19:00:31 +02:00
Valentin Lorentz
7444e656d8 supybot.reply.format.databaseRecord: Add $nick 2020-05-14 18:56:20 +02:00
Valentin Lorentz
4046a1b201 ChannelIdDatabasePlugin: Make the format of showRecord() configurable. 2020-05-14 18:45:04 +02:00
Valentin Lorentz
dc736799b8 callbacks: Prevent passing 'value' as positional argument to registryValue.
In case we need to add other arguments in the future.
2020-05-14 18:43:54 +02:00
Valentin Lorentz
9e57913674 plugins/__init__.py: internationalize strings. 2020-05-14 18:42:22 +02:00
Valentin Lorentz
0c6b526fdd Add -scheduler.repeat to default capabilities.
It's too easy to use to flood.
2020-05-13 20:16:35 +02:00
Valentin Lorentz
e90b89f5b2 Owner: Honor supybot.reply.error.detailed on command syntax errors. 2020-05-13 19:58:06 +02:00
Valentin Lorentz
a9eb31f1b5 Scheduler: Preserve network across restarts. 2020-05-12 18:32:37 +02:00
Valentin Lorentz
27edb4f6c9 Fediverse: Lower timeout of networkless tests.
There are many calls to assertSnarfNoResponse, so there's a lot
of time wasted sleeping, while these commands are fast enough
to answer in less than 0.1s
2020-05-10 21:42:41 +02:00
Valentin Lorentz
dc2fe4d5f3 Fediverse: Deduplicate username formatting and add some error handling. 2020-05-10 21:39:15 +02:00
Valentin Lorentz
2c9e6544f5 Fediverse: Add @status. 2020-05-10 21:12:05 +02:00
Valentin Lorentz
4e74c6dbb3 Fediverse: Make URL snarfer take precedence over Web. 2020-05-10 16:19:13 +02:00
Valentin Lorentz
6ea8b6bb31 Fediverse: Move test data to its own module. 2020-05-10 15:11:10 +02:00
Valentin Lorentz
d1854cfc9b Fediverse: Add URL snarfer. 2020-05-10 14:52:55 +02:00
Valentin Lorentz
5908b86635 Fediverse: Add option format.statuses.showContentWithCW 2020-05-10 13:37:40 +02:00
Valentin Lorentz
a52e7fa91b Fediverse: Show content warnings. 2020-05-10 13:04:01 +02:00
Valentin Lorentz
7511984a60 Fediverse: Fix compatibility with Python 3.4 and 3.5. 2020-05-10 11:21:08 +02:00
Valentin Lorentz
27219409b4 Fediverse: Document how to enable HTTP signatures. 2020-05-10 11:17:35 +02:00
Valentin Lorentz
ec1b1be8ff Fediverse: Add proper tests. 2020-05-10 10:44:56 +02:00
Valentin Lorentz
759fca5eba Switch names of TimeoutDict and ExpiringDict.
For consistency, as TimeoutQueue has guaranteed deletion after the timeout,
like the new TimeoutDict (ex-ExpiringDict).
2020-05-10 08:42:25 +02:00
Valentin Lorentz
d205a9b5f8 Fediverse: Use ExpiringDict instead of TimeoutDict for the cache, it guarantees expiry after the timeout. 2020-05-10 08:34:36 +02:00
Valentin Lorentz
cf2142ddd2 Fediverse: Sign headers Date and Host to prevent replays. 2020-05-09 22:18:03 +02:00
Valentin Lorentz
5c5cad5851 httpserver: Fix circular dependency when servers.http.keepAlive is true. 2020-05-09 22:17:28 +02:00
Valentin Lorentz
fd702a6a92 Fediverse: Add @statuses command. 2020-05-09 21:39:58 +02:00
Valentin Lorentz
4f027f2cbf Config: Add @searchhelp, to search in the help string of config vars and groups. 2020-05-09 21:07:23 +02:00