Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Added configurable maximum download size in shorturl plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
izzy committed May 9, 2014
1 parent 67e4fc9 commit 583d12e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/shorturl.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from plugins.plugin import Plugin
from bs4 import BeautifulSoup

from bytebot_config import BYTEBOT_HTTP_TIMEOUT
from bytebot_config import BYTEBOT_HTTP_TIMEOUT, BYTEBOT_HTTP_MAXSIZE

class shorturl(Plugin):
def googl(self, url):
Expand All @@ -23,7 +23,7 @@ def googl(self, url):
json.dumps(postdata),
headers
)
data = urllib2.urlopen(url=req, timeout=BYTEBOT_HTTP_TIMEOUT).read()
data = urllib2.urlopen(url=req, timeout=BYTEBOT_HTTP_TIMEOUT).read(BYTEBOT_HTTP_MAXSIZE)
ret = json.loads(data)[u'id'].encode('ascii','ignore')

return ret
Expand Down

0 comments on commit 583d12e

Please sign in to comment.