Use SciHub Directly

This commit is contained in:
2023-03-17 22:03:15 -04:00
parent 596c257b77
commit 4acdca9c43
4 changed files with 52 additions and 15 deletions

View File

@@ -7,20 +7,12 @@ import requests as req
bot = commands.Bot()
user = os.environ["OPENSEARCH_USER"]
pswd = os.environ["OPENSEARCH_PASS"]
async def search(txt):
ses = req.Session()
ses.auth = (user, pswd)
resp = ses.get("https://scihub.copernicus.eu/dhus/search", params = {
'q': txt
resp = req.post("https://www.sci-hub.st/", data={
'request':txt
})
return resp
@bot.event
async def on_ready():