mirror of
https://github.com/RussellChamp/tilde-projects.git
synced 2026-10-28 00:22:34 +00:00
Fixed bots. did things
This commit is contained in:
1 parent
a8b397a44f
commit
4ba577b243
5 files changed
+55
-32
No files matched your search
@@ -4,7 +4,7 @@ from bs4 import BeautifulSoup
|
||||
import util.duckduckgo
|
||||
|
||||
def xkcd(query):
|
||||
res = util.duckduckgo.get_zci("site:xkcd.com " + query)
|
||||
res = util.duckduckgo.get_zci("site:m.xkcd.com " + query)
|
||||
title = ""
|
||||
try: # ddg returns a url for these searches. i want a title as well
|
||||
title = BeautifulSoup(requests.get(res).content, "html.parser").title.text
|
||||
|
||||
Reference in new issue
Block a user