Print tostderr
This commit is contained in:
@@ -7,7 +7,11 @@ import os
|
||||
import requests as req
|
||||
from bs4 import BeautifulSoup as soup
|
||||
import pdftotext
|
||||
import sys
|
||||
|
||||
def eprint(*args, **kwargs):
|
||||
print(*args, file=sys.stderr, **kwargs)
|
||||
|
||||
bot = commands.Bot()
|
||||
|
||||
async def search(txt):
|
||||
@@ -30,7 +34,7 @@ async def search(txt):
|
||||
}
|
||||
|
||||
async def getPDF(url):
|
||||
print(f"Fetching PDF: {url}")
|
||||
eprint(f"Fetching PDF: {url}")
|
||||
resp = req.get(url, stream=True)
|
||||
pdf = io.BytesIO(resp.content)
|
||||
pages = pdftotext.PDF(pdf)
|
||||
|
||||
Reference in New Issue
Block a user