Conversation
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host spa5.scrape.center:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)')]
|
I fixed it, check my code. Coder: KSM_YBKXimport asyncio BASE_URL = 'https://spa5.scrape.center/api/book/?limit=18&offset={offset}' logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s: %(message)s") PAGE_SIZE = 18 semaphore = asyncio.Semaphore(CONCURRENCY) MONGO_CONNECTION_STRING = 'mongodb://localhost:27017' client = AsyncIOMotorClient(MONGO_CONNECTION_STRING) async def scrape_api(url): async def save_data(data): async def scrape_detail(id): async def scrape_index(page): async def main(): asyncio.get_event_loop().run_until_complete(main()) |
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host spa5.scrape.center:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)')]