【发布时间】:2022-01-02 07:38:33
【问题描述】:
我有一个 Python 程序,它使用 InstaBot 在 Instagram 中发布信息。 每天晚上我尝试运行代码时都会出现以下错误。 (互联网连接正常) 但是在早上,一切都很好:) 为什么?真的是为什么?
from logging import exception
from instabot import Bot
import os
import shutil
import json
import instabot
import requests
import jdatetime
from datetime import datetime
import time
import random
.
.
.
clean_up(1)
bot = Bot()
while True :
try:
bot.login(username = "****",
password = "****")
break
except Exception as e:
print ('*****************login exception!**********************'+e)
time.sleep(300)
.
.
.
问题:
2021-11-23 23:18:07,183 - 警告 - HTTPSConnectionPool(host='i.instagram.com', port=443): 最大重试次数 超出 url:/api/v1/launcher/sync/(由 NewConnectionError('
:建立新连接失败:[Errno 11001] getaddrinfo 失败'))
【问题讨论】: