home
·
contact
·
privacy
projects
/
plomlombot-irc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f765b2b
)
Send user agent.
author
Christian Heller
<c.heller@plomlompom.de>
Sat, 23 Apr 2016 00:07:36 +0000
(
02:07
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Sat, 23 Apr 2016 00:07:36 +0000
(
02:07
+0200)
plomlombot.py
patch
|
blob
|
history
diff --git
a/plomlombot.py
b/plomlombot.py
index 741b01c65beb60b8c3a0ab0221bf781eae5989fa..28cc9ddbfc82aaf489fb7e76227ff7f91948ddc3 100755
(executable)
--- 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: