From: Christian Heller Date: Sat, 23 Apr 2016 00:07:36 +0000 (+0200) Subject: Send user agent. X-Git-Url: https://plomlompom.com/repos/?a=commitdiff_plain;h=33e9cc50ab23d0ff53e59ef537f32bed2cf38592;p=plomlombot-irc.git Send user agent. --- diff --git a/plomlombot.py b/plomlombot.py index 741b01c..28cc9dd 100755 --- a/plomlombot.py +++ b/plomlombot.py @@ -348,7 +348,7 @@ def handle_url(url, notice, show_url=False): signal.signal(signal.SIGALRM, timeout_handler) signal.alarm(15) try: - r = requests.get(url, stream=True) + r = requests.get(url, headers = {'User-Agent': 'plomlombot'}, stream=True) r.raw.decode_content = True text = r.raw.read(10000000+1) if len(text) > 10000000: