-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNOTES
37 lines (27 loc) · 1.44 KB
/
NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Søke-URL Crt.sh: https://crt.sh/?q=<domene>&output=json
https://github.com/marketplace/actions/autopep8
Reusing function for task 1 and task 4
Rewriting http code to use aiohttp instead of requests, as per this article: https://realpython.com/async-io-python/
Python 3.9 asyncio has to_thread() -> could be possible to use requests without to much hassle
https://www.youtube.com/watch?v=6ow7xloFy5s
had issues with using only one ClientSession in aiohttp. Works better when creating
one ClientSession per request. Might be related to this bug?
https://github.com/aio-libs/aiohttp/issues/3698
According to this (https://stackoverflow.com/questions/62412754/python-asyncio-errors-oserror-winerror-6-the-handle-is-invalid-and-runtim),
there is an issue with the default event loop on Windows in Python 3.8+.
By changing the default event loop, I solved the issue with the weird exception:
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
JSON object sample:
[
{
"issuer_ca_id": 949,
"issuer_name": "C=NO, O=Buypass AS-983163327, CN=Buypass Class 2 CA 2",
"common_name": "webmail.lillesand.kommune.no",
"name_value": "autodiscover.lillesand.kommune.no\nwebmail.lillesand.kommune.no",
"id": 3385124619,
"entry_timestamp": "2020-09-15T16: 28: 14.13",
"not_before": "2020-09-15T16: 28: 08",
"not_after": "2021-09-15T21: 59: 00",
"serial_number": "44e2c4ffc44aadee2027"
}
]