Hello community,

here is the log from the commit of package python-shodan for openSUSE:Factory 
checked in at 2019-12-23 22:45:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-shodan (Old)
 and      /work/SRC/openSUSE:Factory/.python-shodan.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-shodan"

Mon Dec 23 22:45:14 2019 rev:17 rq:758832 version:1.21.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-shodan/python-shodan.changes      
2019-12-04 14:20:04.890423034 +0100
+++ /work/SRC/openSUSE:Factory/.python-shodan.new.6675/python-shodan.changes    
2019-12-23 22:48:04.754081719 +0100
@@ -1,0 +2,6 @@
+Sun Dec 15 09:09:57 UTC 2019 - Sebastian Wagner <[email protected]>
+
+- update to version 1.21.0:
+ - New API methods ``api.search_facets()`` and ``api.search_filters()`` to get 
a list of available facets and filters.
+
+-------------------------------------------------------------------

Old:
----
  shodan-1.20.0.tar.gz

New:
----
  shodan-1.21.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-shodan.spec ++++++
--- /var/tmp/diff_new_pack.I37JzK/_old  2019-12-23 22:48:13.010084767 +0100
+++ /var/tmp/diff_new_pack.I37JzK/_new  2019-12-23 22:48:13.014084769 +0100
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %{!?license: %global license %doc}
 Name:           python-shodan
-Version:        1.20.0
+Version:        1.21.0
 Release:        0
 Summary:        Python library and command-line utility for Shodan
 License:        MIT

++++++ shodan-1.20.0.tar.gz -> shodan-1.21.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.20.0/CHANGELOG.md 
new/shodan-1.21.0/CHANGELOG.md
--- old/shodan-1.20.0/CHANGELOG.md      2019-11-19 02:21:51.000000000 +0100
+++ new/shodan-1.21.0/CHANGELOG.md      2019-12-15 00:24:47.000000000 +0100
@@ -1,6 +1,10 @@
 CHANGELOG
 =========
 
+1.21.0
+------
+* New API methods ``api.search_facets()`` and ``api.search_filters()`` to get 
a list of available facets and filters.
+
 1.20.0
 ------
 * New option "-S" for **shodan domain** to save results from the lookup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.20.0/PKG-INFO new/shodan-1.21.0/PKG-INFO
--- old/shodan-1.20.0/PKG-INFO  2019-11-19 02:24:45.000000000 +0100
+++ new/shodan-1.21.0/PKG-INFO  2019-12-15 00:32:35.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: shodan
-Version: 1.20.0
+Version: 1.21.0
 Summary: Python library and command-line utility for Shodan 
(https://developer.shodan.io)
 Home-page: http://github.com/achillean/shodan-python/tree/master
 Author: John Matherly
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.20.0/setup.py new/shodan-1.21.0/setup.py
--- old/shodan-1.20.0/setup.py  2019-11-19 02:20:48.000000000 +0100
+++ new/shodan-1.21.0/setup.py  2019-12-15 00:21:39.000000000 +0100
@@ -7,7 +7,7 @@
 
 setup(
     name='shodan',
-    version='1.20.0',
+    version='1.21.0',
     description='Python library and command-line utility for Shodan 
(https://developer.shodan.io)',
     long_description=README,
     long_description_content_type='text/x-rst',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.20.0/shodan/cli/scan.py 
new/shodan-1.21.0/shodan/cli/scan.py
--- old/shodan-1.20.0/shodan/cli/scan.py        2019-02-11 03:11:51.000000000 
+0100
+++ new/shodan-1.21.0/shodan/cli/scan.py        2019-12-15 00:21:14.000000000 
+0100
@@ -91,7 +91,7 @@
                                     click.style(str(banner['port']), 
fg=COLORIZE_FIELDS['port']),
                                     ';'.join(banner['hostnames']))
                                 )
-                    except shodan.APIError as e:
+                    except shodan.APIError:
                         # We stop waiting for results if the scan has been 
processed by the crawlers and
                         # there haven't been new results in a while
                         if done:
@@ -100,7 +100,7 @@
                         scan = api.scan_status(scan['id'])
                         if scan['status'] == 'DONE':
                             done = True
-                    except socket.timeout as e:
+                    except socket.timeout:
                         # We stop waiting for results if the scan has been 
processed by the crawlers and
                         # there haven't been new results in a while
                         if done:
@@ -205,7 +205,7 @@
                                 done = True
                                 break
 
-                except shodan.APIError as e:
+                except shodan.APIError:
                     # If the connection timed out before the timeout, that 
means the streaming server
                     # that the user tried to reach is down. In that case, lets 
wait briefly and try
                     # to connect again!
@@ -223,7 +223,7 @@
 
                     if verbose:
                         click.echo('# Scan status: {}'.format(scan['status']))
-                except socket.timeout as e:
+                except socket.timeout:
                     # If the connection timed out before the timeout, that 
means the streaming server
                     # that the user tried to reach is down. In that case, lets 
wait a second and try
                     # to connect again!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.20.0/shodan/client.py 
new/shodan-1.21.0/shodan/client.py
--- old/shodan-1.20.0/shodan/client.py  2019-09-29 20:12:51.000000000 +0200
+++ new/shodan-1.21.0/shodan/client.py  2019-12-15 00:22:51.000000000 +0100
@@ -549,6 +549,20 @@
                 tries += 1
                 time.sleep(1.0)  # wait 1 second if the search errored out for 
some reason
 
+    def search_facets(self):
+        """Returns a list of search facets that can be used to get aggregate 
information about a search query.
+
+        :returns: A list of strings where each is a facet name
+        """
+        return self._request('/shodan/host/search/facets', {})
+
+    def search_filters(self):
+        """Returns a list of search filters that are available.
+
+        :returns: A list of strings where each is a filter name
+        """
+        return self._request('/shodan/host/search/filters', {})
+
     def search_tokens(self, query):
         """Returns information about the search query itself (filters used 
etc.)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shodan-1.20.0/shodan.egg-info/PKG-INFO 
new/shodan-1.21.0/shodan.egg-info/PKG-INFO
--- old/shodan-1.20.0/shodan.egg-info/PKG-INFO  2019-11-19 02:24:45.000000000 
+0100
+++ new/shodan-1.21.0/shodan.egg-info/PKG-INFO  2019-12-15 00:32:35.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: shodan
-Version: 1.20.0
+Version: 1.21.0
 Summary: Python library and command-line utility for Shodan 
(https://developer.shodan.io)
 Home-page: http://github.com/achillean/shodan-python/tree/master
 Author: John Matherly


Reply via email to