@@ -33,15 +33,15 @@ The following have historically been the rate limits per token:
3333* Per hour: 1000 (presumably for status 200 or 201)
3434* Per month: 1000 (presumably for status 201 only)
3535
36- Bitly sends a monthly email if if 50% of the account's usage limit for new short links is exceeded for the calendar month.
36+ Bitly sends a monthly email if 50% of the account's usage limit for new short links is exceeded for the calendar month.
3737If this email is received, it is suggested to immediately obtain and add additional tokens to the pool used by this package.
3838As follows, it is preferable to stay under 50% of the usage limit by having a sufficiently big pool of tokens.
3939It is possible to monitor the usage via the ** ` .usage() ` ** method as shown in the examples.
4040
4141It is unknown what the per-IP rate limit is, if any.
4242
4343### Python
44- Python 3.7+ is required.
44+ Python ≥ 3.7 is required.
4545Any older version of Python will not work due to the use of
4646[ ` ThreadPoolExecutor ` ] ( https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor )
4747with an * initializer* .
@@ -62,19 +62,19 @@ Usage examples:
6262# Shorten to list
6363>> > long_urls = [' https://www.amazon.com/gp/product/B07LFJMS2S/' , ' https://www.cnn.com/election/2020' , ' https://paperswithcode.com/sota' ]
6464>> > shortener.shorten_urls(long_urls)
65- [' https://amzn.to/2HcWFgV ' , ' https://cnn.it/3ofdpVp ' , ' https://j.mp/2IHwQ8P ' ]
65+ [' https://amzn.to/3Inxf9V ' , ' https://cnn.it/3FKKZd8 ' , ' https://bit.ly/3tLlp5w ' ]
6666
6767# Shorten to dict
6868>> > long_urls = [' https://news.google.com' , ' https://yahoo.com/' ]
6969>> > shortener.shorten_urls_to_dict(long_urls)
70- {' https://news.google.com' : ' https://j.mp/31t9qL2 ' , ' https://yahoo.com/' : ' https://yhoo.it/3ondJS2 ' }
70+ {' https://news.google.com' : ' https://bit.ly/3IjSObD ' , ' https://yahoo.com/' : ' https://yhoo.it/2BiHgp8 ' }
7171
7272# Normalize diverse preexisting Bitly links
73- >> > urls = [' http://j.mp/2Bo2LVf ' , ' http://bit.ly/2BombJQ ' , ' https://cnn.it/2Ggb2ih ' , ' https://j.mp/websniffer' ]
73+ >> > urls = [' http://bit.ly/3Ad49Hw ' , ' http://j.mp/2Bo2LVf ' , ' https://cnn.it/3FKKZd8 ' , ' https://j.mp/websniffer' ]
7474>> > shortener.shorten_urls(urls)
75- [' https://j.mp/37qFvH0 ' , ' https://j.mp/3obETLt ' , ' https://cnn.it/2FMI6jc ' , ' https://j.mp/37FmjFV ' ]
75+ [' https://bit.ly/3Ad49Hw ' , ' https://bit.ly/3KjocZw ' , ' https://cnn.it/3FKKZd8 ' , ' https://bit.ly/3nINKph ' ]
7676
77- # Show usage for tokens pool (cached for an hour)
77+ # Show usage for tokens pool (is cached for an hour)
7878>> > shortener.usage()
79790.4604 # Means that an average of 46% of the current calendar month's URL shortening quota has been used across all tokens.
8080
0 commit comments