diff --git a/handyhelper/__init__.py b/handyhelper/__init__.py index 494d388..c0ea490 100644 --- a/handyhelper/__init__.py +++ b/handyhelper/__init__.py @@ -2,6 +2,7 @@ import nextcord as nc from nextcord.ext import commands from typing import Optional import asyncio +import io import os import requests as req from bs4 import BeautifulSoup as soup @@ -30,7 +31,7 @@ async def search(txt): async def getPDF(url): resp = req.get(url, stream=True) - pdf = resp.content + pdf = io.BytesIO(resp.content) pages = pdftotext.PDF(pdf) return "\n\n".join(pages)