mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Document authentication in HTTP crawler and rename prepare_request
This commit is contained in:
@ -333,7 +333,7 @@ class KitIliasWebCrawler(HttpCrawler):
|
||||
sink.done()
|
||||
return True
|
||||
|
||||
auth_id = await self.prepare_request()
|
||||
auth_id = await self._current_auth_id()
|
||||
if await try_stream():
|
||||
return
|
||||
|
||||
@ -343,7 +343,7 @@ class KitIliasWebCrawler(HttpCrawler):
|
||||
raise CrawlError("File streaming failed after authenticate()")
|
||||
|
||||
async def _get_page(self, url: str) -> BeautifulSoup:
|
||||
auth_id = await self.prepare_request()
|
||||
auth_id = await self._current_auth_id()
|
||||
async with self.session.get(url) as request:
|
||||
soup = soupify(await request.read())
|
||||
if self._is_logged_in(soup):
|
||||
|
Reference in New Issue
Block a user