Use SciHub Directly
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user