added user agent
This commit is contained in:
parent
43ab12ac63
commit
b4b32a21df
1 changed files with 3 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ for each hop for a specified host from geographically distant source(s).
|
|||
|
||||
__author__ = 'Dazzlepod (info@dazzlepod.com)'
|
||||
__copyright__ = 'Copyright (c) 2013 Dazzlepod'
|
||||
__version__ = '$Revision: #14 $'
|
||||
__version__ = '$Revision: #15 $'
|
||||
|
||||
import datetime
|
||||
import json
|
||||
|
|
@ -178,6 +178,8 @@ class Traceroute(object):
|
|||
status code and response."""
|
||||
status_code = 200
|
||||
request = urllib2.Request(url = url)
|
||||
request.add_header('User-Agent', 'traceroute/1.0 (+https://github.com/ayeowch/traceroute')
|
||||
|
||||
if context:
|
||||
data = urllib.urlencode(context)
|
||||
request.add_data(data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue