From fac4fe66bf6dddfa3960195800c7a1ca54204444 Mon Sep 17 00:00:00 2001 From: Nikolai R Kristiansen Date: Tue, 22 Mar 2016 14:07:18 +0100 Subject: [PATCH] Fixes https requests and youtube --- requirements.txt | 1 + snurr.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3825ddc..05184ca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ Twisted[tls]==16.0.0 lxml==3.6.0 mysqlclient==1.3.7 requests==2.9.1 +ndg-httpsclient==0.4.0 \ No newline at end of file diff --git a/snurr.py b/snurr.py index c0222ee..b223cd4 100755 --- a/snurr.py +++ b/snurr.py @@ -174,8 +174,8 @@ class IRCActions: content_type = content_type.split(';')[0] reply += "%d %s " % (req.status_code, content_type) if req.status_code == 200 and content_type == "text/html": - # Read max 10240 bytes - partial_html = next(req.iter_content(chunk_size=10240)) + # Read max 20480 bytes + partial_html = next(req.iter_content(chunk_size=20480)) reply += parse_title(partial_html) self.bot.msgReply(nick, channel, reply)