Skip to content

Commit

Permalink
Merge pull request #19 from kwilcox/master
Browse files Browse the repository at this point in the history
SSL fix and 1.5.0
  • Loading branch information
lukecampbell authored Jul 21, 2016
2 parents 8dfc254 + ced343b commit 45e038a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
thredds_crawler
===============

![Travis Build Status](https://travis-ci.org/asascience-open/thredds_crawler.svg)
[![Build Status](https://travis-ci.org/asascience-open/thredds_crawler.svg?branch=master)](https://travis-ci.org/asascience-open/thredds_crawler)

A simple crawler/parser for THREDDS catalogs

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.0
1.5.0
4 changes: 4 additions & 0 deletions tests/test_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@ def test_modified_time(self):
bf = datetime(2016, 2, 1, 0, 0)
c = Crawl("http://tds.maracoos.org/thredds/catalog/MODIS-Chesapeake-Salinity/raw/2016/catalog.xml", before=bf, after=af, debug=True)
assert len(c.datasets) == 11

def test_ssl(self):
c = Crawl("https://opendap.co-ops.nos.noaa.gov/thredds/catalog/NOAA/DBOFS/MODELS/201501/catalog.xml", debug=True)
assert len(c.datasets) > 0
2 changes: 1 addition & 1 deletion thredds_crawler/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.4.0'
__version__ = '1.5.0'
5 changes: 2 additions & 3 deletions thredds_crawler/crawl.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from dateutil.parser import parse
import multiprocessing as mp


INV_NS = "http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0"
XLINK_NS = "http://www.w3.org/1999/xlink"

Expand All @@ -38,7 +37,7 @@ def request_xml(url):
:param str url: URL for the resource to load as an XML
'''
try:
r = requests.get(url)
r = requests.get(url, verify=False)
return r.text.encode('utf-8')
except BaseException:
logger.error("Skipping %s (error parsing the XML)" % url)
Expand Down Expand Up @@ -240,7 +239,7 @@ def __init__(self, dataset_url):
self.data_size = None

# Get an etree object
r = requests.get(dataset_url)
r = requests.get(dataset_url, verify=False)
try:
tree = etree.XML(r.text.encode('utf-8'))
except etree.XMLSyntaxError:
Expand Down
2 changes: 1 addition & 1 deletion thredds_crawler/etree.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
# normal ElementTree install
import elementtree.ElementTree as etree
except ImportError:
raise RuntimeError('You need either lxml or ElementTree')
raise RuntimeError('You need either lxml or ElementTree')

0 comments on commit 45e038a

Please sign in to comment.