Closed derepetko closed 2 years ago
If you did it too frequently, you would get Flood wait error. Another possible reason for getting strange exceptions if you create many articles with the same title, so you get the same telegra.ph urls with different number at the end. Is this your case?
@VarnaX-279 added telegraph.exceptions.RetryAfterError
(see #42)
It can be handled like this:
import time
from telegraph.exceptions import RetryAfterError
...
while True:
try:
response = telegraph.create_page( ... )
break
except RetryAfterError as r:
time.sleep(r.retry_after)
Though if you can't wait for long, you'll probably need to use multiple proxies / accounts
Trying to handle this exception and sleep but i get 'TelegraphException' object has no attribute 'retry_after'
I have list of images that i upload
for j in img:
try:
img_src=img_src+'<img src='+str(upload.upload_file(str(i)+"/"+str(j))[0])+'>'
except RetryAfterError as r:
print("Try again later____")#except Exception as e:#open("error.txt", "a").write(str(str(e)+"\n"))
time.sleep(r.retry_after)
When filling out another article through Bot, I received this error.
The telegraph allowed me to fill in only 21 articles. How to fix it and what could be the reason?