Skip to content

Commit

Permalink
Revert "avoid clobbering user-agent specified in headers"
Browse files Browse the repository at this point in the history
This reverts commit 4626661.
  • Loading branch information
jamesturk committed Aug 27, 2012
1 parent edf6ba0 commit 411e9f0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scrapelib/__init__.py
@@ -1,3 +1,5 @@
import datetime
import json
import logging
import os
import sys
Expand Down Expand Up @@ -361,11 +363,7 @@ def user_agent(self):

@user_agent.setter
def user_agent(self, value):
# Avoid clobbering user-agent specified in headers
if 'user-agent' in [k.lower() for k in self.headers.keys()]:
pass
else:
self.headers['user-agent'] = value
self.headers['user-agent'] = value

@property
def follow_robots(self):
Expand Down

0 comments on commit 411e9f0

Please sign in to comment.