Skip to content

Commit

Permalink
testing ssl_flag
Browse files Browse the repository at this point in the history
  • Loading branch information
wmaiouiru committed Jun 3, 2023
1 parent bbb81ac commit 6663f70
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions secedgar/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ def __init__(self,
retry_count=3,
batch_size=10,
backoff_factor=0,
rate_limit=10):
rate_limit=10,
ssl_flag=True):
self.retry_count = retry_count
self.batch_size = batch_size
self.backoff_factor = backoff_factor
self.rate_limit = rate_limit
self.user_agent = user_agent
self.ssl_flag = ssl_flag

@property
def retry_count(self):
Expand Down Expand Up @@ -254,7 +256,7 @@ def batch(iterable, n):
for ndx in range(0, length, n):
yield iterable[ndx:min(ndx + n, length)]

conn = aiohttp.TCPConnector(limit=self.rate_limit, ssl=False)
conn = aiohttp.TCPConnector(limit=self.rate_limit, ssl=self.ssl_flag)
headers = {
"Connection": "keep-alive",
"User-Agent": self.user_agent,
Expand Down

0 comments on commit 6663f70

Please sign in to comment.