aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-08 03:30:57 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-08 03:30:57 +0100
commit45eb36168a647690b8b5f5eef8bc0e4c5c609384 (patch)
tree86da235b4c13485bb0c7718ebd11d4583f2ac691 /src/plugins
parentupdate todo: ping monitor (diff)
downloadxpybar-45eb36168a647690b8b5f5eef8bc0e4c5c609384.tar.gz
xpybar-45eb36168a647690b8b5f5eef8bc0e4c5c609384.tar.bz2
xpybar-45eb36168a647690b8b5f5eef8bc0e4c5c609384.tar.xz
use curl instead of wget
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/chase.py2
-rw-r--r--src/plugins/ipaddress.py18
-rw-r--r--src/plugins/leapsec.py2
-rw-r--r--src/plugins/weather.py2
4 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/chase.py b/src/plugins/chase.py
index 290ef6b..e94497b 100644
--- a/src/plugins/chase.py
+++ b/src/plugins/chase.py
@@ -42,7 +42,7 @@ class Chase:
@return :bool Whether information could be fetched
'''
- command = ['wget', 'http://www.doeschasehaveajobyet.com', '-O', '-']
+ command = ['curl', 'http://www.doeschasehaveajobyet.com']
proc = subprocess.Popen(command, stderr = sys.stderr, stdout = subprocess.PIPE)
page = proc.stdout.read()
proc.wait()
diff --git a/src/plugins/ipaddress.py b/src/plugins/ipaddress.py
index e150ecc..7f370d6 100644
--- a/src/plugins/ipaddress.py
+++ b/src/plugins/ipaddress.py
@@ -111,7 +111,7 @@ class IPAddress:
def __site_0(self):
try:
- data = spawn_read('wget', 'http://checkip.dyndns.org', '-O', '-')
+ data = spawn_read('curl', 'http://checkip.dyndns.org')
if not data == '':
self.__isolated = False
return data.split('<body>')[1].split('</body>')[0].split(': ')[1]
@@ -120,7 +120,7 @@ class IPAddress:
def __site_1(self):
try:
- data = spawn_read('wget', 'http://ipecho.net/plain', '-O', '-')
+ data = spawn_read('curl', 'http://ipecho.net/plain')
if not data == '':
self.__isolated = False
data = data.strip()
@@ -130,7 +130,7 @@ class IPAddress:
def __site_2(self):
try:
- data = spawn_read('wget', 'http://www.checkmyipaddress.org', '-O', '-')
+ data = spawn_read('curl', 'http://www.checkmyipaddress.org')
if not data == '':
self.__isolated = False
data = [line.strip() for line in data.replace('\r\n', '\n').split('\n') if '</h3>' in line]
@@ -142,7 +142,7 @@ class IPAddress:
def __site_3(self):
try:
- data = spawn_read('wget', 'http://www.ip-address.org', '-O', '-')
+ data = spawn_read('curl', 'http://www.ip-address.org')
if not data == '':
self.__isolated = False
data = [line.strip(' \t') for line in data.replace('\r\n', '\n').split('\n') if 'ip += ' in line]
@@ -161,7 +161,7 @@ class IPAddress:
def __site_4(self):
try:
- data = spawn_read('wget', 'http://www.myipnumber.com/my-ip-address.asp', '-O', '-')
+ data = spawn_read('curl', 'http://www.myipnumber.com/my-ip-address.asp')
if not data == '':
self.__isolated = False
data = data.replace('\r\n', '\n').split('\nThe IP Address of this machine is:\n')[1]
@@ -171,7 +171,7 @@ class IPAddress:
def __site_5(self):
try:
- data = spawn_read('wget', 'http://www.findipinfo.com', '-O', '-')
+ data = spawn_read('curl', 'http://www.findipinfo.com')
if not data == '':
self.__isolated = False
return data.split('Your IP Address Is: ')[1].split('<')[0]
@@ -180,7 +180,7 @@ class IPAddress:
def __site_6(self):
try:
- data = spawn_read('wget', 'http://what-ip.net', '-O', '-')
+ data = spawn_read('curl', 'http://what-ip.net')
if not data == '':
self.__isolated = False
return data.split('Your IP Address is : ')[1].split('<b>')[1].split('</b>')[0]
@@ -189,7 +189,7 @@ class IPAddress:
def __site_7(self):
try:
- data = spawn_read('wget', 'http://my-ip-address.com', '-O', '-')
+ data = spawn_read('curl', 'http://my-ip-address.com')
if not data == '':
self.__isolated = False
return data.split('<input ')[1].split('>')[0].split('value=')[1].split('"')[1]
@@ -198,7 +198,7 @@ class IPAddress:
def __site_8(self):
try:
- data = spawn_read('wget', 'https://duckduckgo.com?q=what is my ip address', '-O', '-')
+ data = spawn_read('curl', 'https://duckduckgo.com?q=what is my ip address')
if not data == '':
self.__isolated = False
return data.split('"Answer":"Your IP address is ')[1].split(' ')[0]
diff --git a/src/plugins/leapsec.py b/src/plugins/leapsec.py
index f04ad8d..ec8cfa1 100644
--- a/src/plugins/leapsec.py
+++ b/src/plugins/leapsec.py
@@ -49,7 +49,7 @@ class LeapSeconds:
Constructor
'''
url = 'http://maia.usno.navy.mil/ser7/leapsec.dat'
- announcements = spawn_read('wget', url, '-O', '-')
+ announcements = spawn_read('curl', url)
while ' ' in announcements:
announcements = announcements.replace(' ', ' ')
announcements = announcements.replace('= ', '=').replace('=JD ', '=JD')
diff --git a/src/plugins/weather.py b/src/plugins/weather.py
index a02bf85..f04fe9d 100644
--- a/src/plugins/weather.py
+++ b/src/plugins/weather.py
@@ -55,7 +55,7 @@ class Weather:
'''
self.icao = station
url = 'http://weather.noaa.gov/pub/data/observations/metar/decoded/%s.TXT' % station
- decoded = spawn_read('wget', url, '-O', '-').split('\n')
+ decoded = spawn_read('curl', url).split('\n')
# How to parse: http://www.wunderground.com/metarFAQ.asp
station_header, self.headers, decoded = decoded[0].split(', '), decoded[:2], decoded[2:]