mirror of
https://github.com/laramies/theHarvester.git
synced 2024-11-11 18:03:10 +08:00
commit
caec73691d
1 changed files with 2 additions and 0 deletions
|
@ -25,6 +25,7 @@ def __init__(self, word):
|
|||
async def request(self, url, first=False):
|
||||
try:
|
||||
if first:
|
||||
# indicates first request to extract cookie
|
||||
async with aiohttp.ClientSession(headers=self.headers, timeout=self.timeout) as sess:
|
||||
async with sess.get(url) as resp:
|
||||
await asyncio.sleep(3)
|
||||
|
@ -57,6 +58,7 @@ async def create_cookies(self, cookie):
|
|||
async def get_cookies(self, headers):
|
||||
try:
|
||||
if headers is None:
|
||||
# In this case just return default dict
|
||||
return {}
|
||||
elif 'set-cookie' in headers:
|
||||
cookies = await self.create_cookies(headers['set-cookie'])
|
||||
|
|
Loading…
Reference in a new issue