Skip to content

Commit

Permalink
Fixing small bug with next method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Iury O. G. Figueiredo committed Jul 8, 2017
1 parent 6943202 commit a96cdcb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
7 changes: 7 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# file GENERATED by distutils, do NOT edit
LICENSE
README.md
setup.py
sukhoi.py
demo/by_tags.py
demo/quotes.py
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from distutils.core import setup
setup(name="sukhoi",
version="0.0.3",
version="0.0.4",
py_modules=["sukhoi"],
author="Iury O. G. Figueiredo",
author_email="[email protected]",
Expand Down Expand Up @@ -37,5 +37,6 @@






11 changes: 4 additions & 7 deletions sukhoi.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@ class Miner(list):
task.add_map(DONE, lambda task: die())
task.start()

def __init__(self, url, pool=None, max_depth=10,
def __init__(self, url, pool=None,
headers=HEADERS, method='get', payload={}, auth=()):
self.pool = pool
self.url = url
self.urlparser = urlparse(url)
self.max_depth = max_depth
self.headers = headers
self.method = method
self.payload = payload
Expand Down Expand Up @@ -120,12 +119,9 @@ def geturl(self, reference):
return url

def next(self, reference):
self.url = self.geturl(reference)
self.url = self.geturl(reference)
self.urlparser = urlparse(self.url)
self.expand()
# self.__class__(url, self.pool, self.max_depth)

# def __repr__(self):
# return str(self.pool)

def run(self, dom):
"""
Expand All @@ -137,3 +133,4 @@ def run(self, dom):




0 comments on commit a96cdcb

Please sign in to comment.