AlexMathew/scrapple

View on GitHub
scrapple/selectors/selector.py

Summary

Maintainability
D
2 days
Test Coverage

Function extract_columns has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    def extract_columns(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
        """
        Column data extraction for extract_tabular
        """
        result_list = []
Severity: Minor
Found in scrapple/selectors/selector.py - About 3 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Cyclomatic complexity is too high in method extract_columns. (14)
Open

    def extract_columns(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
        """
        Column data extraction for extract_tabular
        """
        result_list = []
Severity: Minor
Found in scrapple/selectors/selector.py by radon

Cyclomatic Complexity

Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

Construct Effect on CC Reasoning
if +1 An if statement is a single decision.
elif +1 The elif statement adds another decision.
else +0 The else statement does not cause a new decision. The decision is at the if.
for +1 There is a decision at the start of the loop.
while +1 There is a decision at the while statement.
except +1 Each except branch adds a new conditional path of execution.
finally +0 The finally block is unconditionally executed.
with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
assert +1 The assert statement internally roughly equals a conditional statement.
Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

Source: http://radon.readthedocs.org/en/latest/intro.html

Cyclomatic complexity is too high in method extract_rows. (10)
Open

    def extract_rows(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
        """
        Row data extraction for extract_tabular
        """
        result_list = []
Severity: Minor
Found in scrapple/selectors/selector.py by radon

Cyclomatic Complexity

Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

Construct Effect on CC Reasoning
if +1 An if statement is a single decision.
elif +1 The elif statement adds another decision.
else +0 The else statement does not cause a new decision. The decision is at the if.
for +1 There is a decision at the start of the loop.
while +1 There is a decision at the while statement.
except +1 Each except branch adds a new conditional path of execution.
finally +0 The finally block is unconditionally executed.
with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
assert +1 The assert statement internally roughly equals a conditional statement.
Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

Source: http://radon.readthedocs.org/en/latest/intro.html

Cyclomatic complexity is too high in method extract_tabular. (9)
Open

    def extract_tabular(self, header='', prefix='', suffix='', table_type='', *args, **kwargs):
        """
        Method for performing the tabular data extraction. \

        :param result: A dictionary containing the extracted data so far
Severity: Minor
Found in scrapple/selectors/selector.py by radon

Cyclomatic Complexity

Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

Construct Effect on CC Reasoning
if +1 An if statement is a single decision.
elif +1 The elif statement adds another decision.
else +0 The else statement does not cause a new decision. The decision is at the if.
for +1 There is a decision at the start of the loop.
while +1 There is a decision at the while statement.
except +1 Each except branch adds a new conditional path of execution.
finally +0 The finally block is unconditionally executed.
with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
assert +1 The assert statement internally roughly equals a conditional statement.
Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

Source: http://radon.readthedocs.org/en/latest/intro.html

Cyclomatic complexity is too high in method extract_content. (8)
Open

    def extract_content(self, selector='', attr='', default='', connector='', *args, **kwargs):
        """
        Method for performing the content extraction for the particular selector type. \

        If the selector is "url", the URL of the current web page is returned.
Severity: Minor
Found in scrapple/selectors/selector.py by radon

Cyclomatic Complexity

Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

Construct Effect on CC Reasoning
if +1 An if statement is a single decision.
elif +1 The elif statement adds another decision.
else +0 The else statement does not cause a new decision. The decision is at the if.
for +1 There is a decision at the start of the loop.
while +1 There is a decision at the while statement.
except +1 Each except branch adds a new conditional path of execution.
finally +0 The finally block is unconditionally executed.
with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
assert +1 The assert statement internally roughly equals a conditional statement.
Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

Source: http://radon.readthedocs.org/en/latest/intro.html

Function extract_rows has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    def extract_rows(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
        """
        Row data extraction for extract_tabular
        """
        result_list = []
Severity: Minor
Found in scrapple/selectors/selector.py - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Cyclomatic complexity is too high in class Selector. (7)
Open

class Selector(object):
    """
    This class defines the basic ``Selector`` object. 

    """
Severity: Minor
Found in scrapple/selectors/selector.py by radon

Cyclomatic Complexity

Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

Construct Effect on CC Reasoning
if +1 An if statement is a single decision.
elif +1 The elif statement adds another decision.
else +0 The else statement does not cause a new decision. The decision is at the if.
for +1 There is a decision at the start of the loop.
while +1 There is a decision at the while statement.
except +1 Each except branch adds a new conditional path of execution.
finally +0 The finally block is unconditionally executed.
with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
assert +1 The assert statement internally roughly equals a conditional statement.
Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

Source: http://radon.readthedocs.org/en/latest/intro.html

Function extract_rows has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def extract_rows(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
Severity: Major
Found in scrapple/selectors/selector.py - About 1 hr to fix

Function extract_columns has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def extract_columns(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
Severity: Major
Found in scrapple/selectors/selector.py - About 1 hr to fix

Function extract_tabular has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    def extract_tabular(self, header='', prefix='', suffix='', table_type='', *args, **kwargs):
        """
        Method for performing the tabular data extraction. \

        :param result: A dictionary containing the extracted data so far
Severity: Minor
Found in scrapple/selectors/selector.py - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function extract_content has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    def extract_content(self, selector='', attr='', default='', connector='', *args, **kwargs):
        """
        Method for performing the content extraction for the particular selector type. \

        If the selector is "url", the URL of the current web page is returned.
Severity: Minor
Found in scrapple/selectors/selector.py - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function extract_content has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def extract_content(self, selector='', attr='', default='', connector='', *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py - About 45 mins to fix

Function extract_tabular has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def extract_tabular(self, header='', prefix='', suffix='', table_type='', *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py - About 45 mins to fix

Refactor this function to reduce its Cognitive Complexity from 25 to the 15 allowed.
Open

    def extract_columns(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
Severity: Critical
Found in scrapple/selectors/selector.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.
Open

    def extract_rows(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
Severity: Critical
Found in scrapple/selectors/selector.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Method "extract_columns" has 10 parameters, which is greater than the 7 authorized.
Open

    def extract_columns(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
Severity: Major
Found in scrapple/selectors/selector.py by sonar-python

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Method "extract_rows" has 10 parameters, which is greater than the 7 authorized.
Open

    def extract_rows(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
Severity: Major
Found in scrapple/selectors/selector.py by sonar-python

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                        if attr == "text":
                            try:
                                content = connector.join([make_ascii(x).strip() for x in col.itertext()])
                            except Exception:
                                content = default
Severity: Major
Found in scrapple/selectors/selector.py and 1 other location - About 2 hrs to fix
scrapple/selectors/selector.py on lines 207..212

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 60.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                if attr.lower() == "text":
                    try:
                        content = connector.join([make_ascii(x).strip() for x in val.itertext()])
                    except Exception:
                        content = default
Severity: Major
Found in scrapple/selectors/selector.py and 1 other location - About 2 hrs to fix
scrapple/selectors/selector.py on lines 252..257

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 60.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            try:
                header_list = self.get_tree_tag(header)
                table_headers = [prefix + h.text + suffix for h in header_list]
            except XPathError:
                raise Exception("Invalid %s selector for table header - %s" % (self.__selector_type__, header))
Severity: Major
Found in scrapple/selectors/selector.py and 1 other location - About 1 hr to fix
scrapple/selectors/selector.py on lines 139..147

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        try:
            links = self.get_tree_tag(selector=selector)
            for link in links:
                next_url = urljoin(self.url, link.get('href'))
                yield type(self)(next_url)
Severity: Major
Found in scrapple/selectors/selector.py and 1 other location - About 1 hr to fix
scrapple/selectors/selector.py on lines 170..176

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        try:
            values = self.get_tree_tag(selector)
            if len(table_headers) >= len(values):
                from itertools import izip_longest
                pairs = izip_longest(table_headers, values, fillvalue=default)
Severity: Major
Found in scrapple/selectors/selector.py and 1 other location - About 1 hr to fix
scrapple/selectors/selector.py on lines 233..269

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        try:
            if type(selector) in [str, unicode]:
                selectors = [selector]
            elif type(selector) == list:
                selectors = selector[:]
Severity: Major
Found in scrapple/selectors/selector.py and 1 other location - About 1 hr to fix
scrapple/selectors/selector.py on lines 196..222

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Blank line contains whitespace
Open

    
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Trailing whitespace is superfluous.

The warning returned varies on whether the line itself is blank,
for easier filtering for those who want to indent their blank lines.

Okay: spam(1)\n#
W291: spam(1) \n#
W293: class Foo(object):\n    \n    bang = 12

Indentation contains tabs
Open

        been specified, and that the URL is valid. A HTTP GET request is made to load \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Continuation line missing indentation or outdented
Open

                'Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Indentation contains tabs
Open

        raise NotImplementedError
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        If the selector is "url", the URL of the current web page is returned.
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        attribute to be extracted ("text", "href", etc.) is specified in the method \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        If no default value is specified, an exception is raised.
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                if attr in ["href", "src"]:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (83 > 79 characters)
Open

            raise Exception("Invalid %s selector - %s" % (self.__selector_type__, selector))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Line too long (81 > 79 characters)
Open

        The selector passed as the argument is a selector to point to the anchor tags \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Line too long (120 > 79 characters)
Open

        a ``XpathSelector``/``CssSelector`` object (as is the case) is created with the URL of the next page as the argument \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Line too long (90 > 79 characters)
Open

        :return: A ``XpathSelector``/``CssSelector`` object for every page to be crawled through 
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Line too long (92 > 79 characters)
Open

    def extract_tabular(self, header='', prefix='', suffix='', table_type='', *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

        Method for performing the tabular data extraction. \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        :param result: A dictionary containing the extracted data so far
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (87 > 79 characters)
Open

        :param default: The default value to be used if the selector does not return any data
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

        dictionaries which contain (header, content) pairs
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            raise Exception("Invalid %s selector for table header - %s" % (self.__selector_type__, header))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        else:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    def extract_rows(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                else:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            raise Exception("Invalid %s selector - %s" % (self.__selector_type__, selector))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        Column data extraction for extract_tabular
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            if type(selector) in [str, unicode]:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            else:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                raise Exception("Use a list of selector expressions for the various columns")
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                columns[head] = self.get_tree_tag(selector)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    __selector_type__ = ''
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (92 > 79 characters)
Open

            raise Exception('Ensure that you are connected to the Internet and that the page exists')
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Trailing whitespace
Open

        :return: A ``XpathSelector``/``CssSelector`` object for every page to be crawled through 
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Trailing whitespace is superfluous.

The warning returned varies on whether the line itself is blank,
for easier filtering for those who want to indent their blank lines.

Okay: spam(1)\n#
W291: spam(1) \n#
W293: class Foo(object):\n    \n    bang = 12

Indentation contains tabs
Open

        A column extraction is when a set of rows have to be extracted, giving a list of header-value mappings.
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (130 > 79 characters)
Open

        :param header: The headers to be used for the table. This can be a list of headers, or a selector that gives the list of headers
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                table_headers = [prefix + h.text + suffix for h in header_list]
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            except XPathError:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        if table_type == "rows":
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            if len(table_headers) >= len(values):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                    for head in columns.keys():
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (81 > 79 characters)
Open

        been specified, and that the URL is valid. A HTTP GET request is made to load \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (132 > 79 characters)
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Continuation line missing indentation or outdented
Open

                'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Indentation contains tabs
Open

            raise Exception('URL should be of the form "http://<page_link>')
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            raise Exception('Ensure that you are connected to the Internet and that the page exists')
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            if selector.lower() == "url":
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            raise Exception("Invalid %s selector - %s" % (self.__selector_type__, selector))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            for link in links:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        :param suffix: A suffix to be added to each header
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                header_list = self.get_tree_tag(header)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                raise Exception("Invalid %s selector for table header - %s" % (self.__selector_type__, header))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        if len(table_headers) == 0:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        except TypeError:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    def extract_columns(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        result_list = []
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                selectors = [selector]
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                        if attr == "text":
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                            content = content.replace("\n", " ").strip()
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Trailing whitespace
Open

    This class defines the basic ``Selector`` object. 
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Trailing whitespace is superfluous.

The warning returned varies on whether the line itself is blank,
for easier filtering for those who want to indent their blank lines.

Okay: spam(1)\n#
W291: spam(1) \n#
W293: class Foo(object):\n    \n    bang = 12

Indentation contains tabs
Open

                'Mozilla/5.0 (Windows NT 6.1; rv:34.0) Gecko/20100101 Firefox/34.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Continuation line missing indentation or outdented
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Indentation contains tabs
Open

        except requests.exceptions.ConnectionError:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        Method for performing the content extraction for the particular selector type. \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        arguments, and this is used to extract the required content. If the content \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        :param default: The default value to be used if the selector does not return any data
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        :return: The extracted content
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                return self.url
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Too many blank lines (2)
Open

    def extract_links(self, selector='', *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Separate top-level function and class definitions with two blank lines.

Method definitions inside a class are separated by a single blank
line.

Extra blank lines may be used (sparingly) to separate groups of
related functions.  Blank lines may be omitted between a bunch of
related one-liners (e.g. a set of dummy implementations).

Use blank lines in functions, sparingly, to indicate logical
sections.

Okay: def a():\n    pass\n\n\ndef b():\n    pass
Okay: def a():\n    pass\n\n\nasync def b():\n    pass
Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
Okay: default = 1\nfoo = 1
Okay: classify = 1\nfoo = 1

E301: class Foo:\n    b = 0\n    def bar():\n        pass
E302: def a():\n    pass\n\ndef b(n):\n    pass
E302: def a():\n    pass\n\nasync def b(n):\n    pass
E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
E303: def a():\n\n\n\n    pass
E304: @decorator\n\ndef a():\n    pass
E305: def a():\n    pass\na()
E306: def a():\n    def b():\n        pass\n    def c():\n        pass

Indentation contains tabs
Open

        :param selector: The selector for the anchor tags to be crawled through
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        :return: A 2-tuple containing the list of all the column headers extracted and the list of \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (131 > 79 characters)
Open

    def extract_rows(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                        content = urljoin(self.url, content)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (81 > 79 characters)
Open

                raise Exception("Use a list of selector expressions for the various columns")
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

            pairs = izip(table_headers, selectors)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            for head, selector in pairs:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                for i in count(start=0):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        The URL of the web page to be loaded is validated - ensuring the schema has \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        the web page, and the HTML content of this fetched web page is used to generate \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        be parsed to extract the necessary content.
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (83 > 79 characters)
Open

                'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains mixed spaces and tabs
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10; rv:33.0) Gecko/20100101 Firefox/33.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Indentation contains tabs
Open

                'Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (113 > 79 characters)
Open

                'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2224.3 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Line too long (118 > 79 characters)
Open

                'Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

            self.tree = etree.HTML(self.content)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        :param attr: The attribute to be extracted from the selected tag
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                content = content.replace("\n", " ").strip()
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Trailing whitespace
Open

                'Accept-Encoding': 'identity, compress, gzip', 
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Trailing whitespace is superfluous.

The warning returned varies on whether the line itself is blank,
for easier filtering for those who want to indent their blank lines.

Okay: spam(1)\n#
W291: spam(1) \n#
W293: class Foo(object):\n    \n    bang = 12

Trailing whitespace
Open

        and this created object is yielded. 
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Trailing whitespace is superfluous.

The warning returned varies on whether the line itself is blank,
for easier filtering for those who want to indent their blank lines.

Okay: spam(1)\n#
W291: spam(1) \n#
W293: class Foo(object):\n    \n    bang = 12

Indentation contains mixed spaces and tabs
Open

                'Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Too many blank lines (2)
Open

    def get_tree_tag(self, selector='', get_one=False, *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Separate top-level function and class definitions with two blank lines.

Method definitions inside a class are separated by a single blank
line.

Extra blank lines may be used (sparingly) to separate groups of
related functions.  Blank lines may be omitted between a bunch of
related one-liners (e.g. a set of dummy implementations).

Use blank lines in functions, sparingly, to indicate logical
sections.

Okay: def a():\n    pass\n\n\ndef b():\n    pass
Okay: def a():\n    pass\n\n\nasync def b():\n    pass
Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
Okay: default = 1\nfoo = 1
Okay: classify = 1\nfoo = 1

E301: class Foo:\n    b = 0\n    def bar():\n        pass
E302: def a():\n    pass\n\ndef b(n):\n    pass
E302: def a():\n    pass\n\nasync def b(n):\n    pass
E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
E303: def a():\n\n\n\n    pass
E304: @decorator\n\ndef a():\n    pass
E305: def a():\n    pass\na()
E306: def a():\n    def b():\n        pass\n    def c():\n        pass

Indentation contains tabs
Open

        the links to be crawled through.
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                content = connector.join([make_ascii(x).strip() for x in tag.itertext()])
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        try:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                tag = self.get_tree_tag(selector=selector, get_one=True)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        :param prefix: A prefix to be added to each header
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                yield type(self)(next_url)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    This class defines the basic ``Selector`` object. 
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (105 > 79 characters)
Open

        A column extraction is when a set of rows have to be extracted, giving a list of header-value mappings.
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Line too long (84 > 79 characters)
Open

        the :ref:`element tree <concepts-structure>`. This is the element tree that will \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

        :param selector: For row extraction, this is a selector that gives the row to be extracted. \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        if type(header) in [str, unicode]:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        the :ref:`element tree <concepts-structure>`. This is the element tree that will \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (94 > 79 characters)
Open

        :return: A 2-tuple containing the list of all the column headers extracted and the list of \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                raise Exception("Invalid %s selector for table header - %s" % (self.__selector_type__, header))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        try:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            try:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                'Mozilla/5.0 (Windows NT 5.1; rv:34.0) Gecko/20100101 Firefox/34.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                if verbosity > 1:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            raise Exception("Selector expression string to be provided. Got " + selector)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            except Exception:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains mixed spaces and tabs
Open

                'Mozilla/5.0 (Windows NT 5.1; rv:34.0) Gecko/20100101 Firefox/34.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Indentation contains tabs
Open

        Row data extraction for extract_tabular
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains mixed spaces and tabs
Open

                'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Indentation contains tabs
Open

            else:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains mixed spaces and tabs
Open

                'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2224.3 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Indentation contains tabs
Open

        """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                'Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                selectors = selector[:]
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains mixed spaces and tabs
Open

                'Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Indentation contains tabs
Open

                                content = urljoin(self.url, content)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            self.url = url
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (82 > 79 characters)
Open

        Method for performing the content extraction for the particular selector type. \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

            raise Exception("Invalid %s selector - %s" % (self.__selector_type__, selector))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                    content = urljoin(self.url, content)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (80 > 79 characters)
Open

            raise Exception("Selector expression string to be provided. Got " + selector)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

        and this created object is yielded. 
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (101 > 79 characters)
Open

        :param table_type: Can be "rows" or "columns". This determines the type of table to be extracted. \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

        :param table_type: Can be "rows" or "columns". This determines the type of table to be extracted. \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        :param attr: The attribute to be extracted from the selected tag
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        :param default: The default value to be used if the selector does not return any data
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        :param verbosity: The verbosity set as the argument for scrapple run
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            for head, val in pairs:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                if attr.lower() == "text":
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                    except Exception:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                    if attr in ["href", "src"]:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains mixed spaces and tabs
Open

                'Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Line too long (85 > 79 characters)
Open

                'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10; rv:33.0) Gecko/20100101 Firefox/33.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Continuation line missing indentation or outdented
Open

                'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Indentation contains tabs
Open

    def get_tree_tag(self, selector='', get_one=False, *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (81 > 79 characters)
Open

        Otherwise, the selector expression is used to extract content. The particular \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                content = tag.get(attr)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        except IndexError:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        :return: A ``XpathSelector``/``CssSelector`` object for every page to be crawled through 
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Blank line contains whitespace
Open

        
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Trailing whitespace is superfluous.

The warning returned varies on whether the line itself is blank,
for easier filtering for those who want to indent their blank lines.

Okay: spam(1)\n#
W291: spam(1) \n#
W293: class Foo(object):\n    \n    bang = 12

Indentation contains tabs
Open

            links = self.get_tree_tag(selector=selector)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (83 > 79 characters)
Open

            raise Exception("Invalid %s selector - %s" % (self.__selector_type__, selector))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Line too long (95 > 79 characters)
Open

        :param selector: For row extraction, this is a selector that gives the row to be extracted. \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Line too long (98 > 79 characters)
Open

            raise Exception("Invalid %s selector for table header - %s" % (self.__selector_type__, header))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

        """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            values = self.get_tree_tag(selector)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            from itertools import izip, count
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        except TypeError:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Too many blank lines (2)
Open

    def __init__(self, url):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Separate top-level function and class definitions with two blank lines.

Method definitions inside a class are separated by a single blank
line.

Extra blank lines may be used (sparingly) to separate groups of
related functions.  Blank lines may be omitted between a bunch of
related one-liners (e.g. a set of dummy implementations).

Use blank lines in functions, sparingly, to indicate logical
sections.

Okay: def a():\n    pass\n\n\ndef b():\n    pass
Okay: def a():\n    pass\n\n\nasync def b():\n    pass
Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
Okay: default = 1\nfoo = 1
Okay: classify = 1\nfoo = 1

E301: class Foo:\n    b = 0\n    def bar():\n        pass
E302: def a():\n    pass\n\ndef b(n):\n    pass
E302: def a():\n    pass\n\nasync def b(n):\n    pass
E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
E303: def a():\n\n\n\n    pass
E304: @decorator\n\ndef a():\n    pass
E305: def a():\n    pass\na()
E306: def a():\n    def b():\n        pass\n    def c():\n        pass

Indentation contains tabs
Open

        """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        extracted is a link (from an attr value of "href" or "src"), the URL is parsed \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        to convert the relative path into an absolute path.
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            if attr.lower() == "text":
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                return default
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        are iterated through. The relative paths are converted into absolute paths and \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (80 > 79 characters)
Open

            result_list = self.extract_rows(table_headers=table_headers, *args, **kwargs)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                    try:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                        content = default
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                            print("\nExtracting", head, "attribute", sep=' ', end='')
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                            if attr in ["href", "src"]:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            except IndexError:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (83 > 79 characters)
Open

            raise Exception("Invalid %s selector - %s" % (self.__selector_type__, selector))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

    from urllib.parse import urljoin
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            }
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (88 > 79 characters)
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:34.0) Gecko/20100101 Firefox/34.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains mixed spaces and tabs
Open

                'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Indentation contains mixed spaces and tabs
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Continuation line missing indentation or outdented
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Indentation contains tabs
Open

    def extract_content(self, selector='', attr='', default='', connector='', *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            if default is not "":
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        except requests.exceptions.MissingSchema:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (92 > 79 characters)
Open

    def extract_content(self, selector='', attr='', default='', connector='', *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Line too long (83 > 79 characters)
Open

        the web page, and the HTML content of this fetched web page is used to generate \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:34.0) Gecko/20100101 Firefox/34.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        except XPathError:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        Otherwise, the selector expression is used to extract content. The particular \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains mixed spaces and tabs
Open

                'Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Indentation contains tabs
Open

        Method for performing the link extraction for the crawler. \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (82 > 79 characters)
Open

        extracted is a link (from an attr value of "href" or "src"), the URL is parsed \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Line too long (113 > 79 characters)
Open

                'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (84 > 79 characters)
Open

        that the crawler should pass through. A list of links is obtained, and the links \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Continuation line missing indentation or outdented
Open

                'Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Indentation contains tabs
Open

        If the selector does not fetch any content, the default value is returned. \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        that the crawler should pass through. A list of links is obtained, and the links \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        :param selector: The XPath expression
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (98 > 79 characters)
Open

        A row extraction is when there is a single row to be extracted and mapped to a set of headers. \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

        :param connector: String connector for list of data returned for a particular selector
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        if table_type not in ["rows", "columns"]:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        result_list = []
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        The selector passed as the argument is a selector to point to the anchor tags \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                from itertools import izip
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            else:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        a ``XpathSelector``/``CssSelector`` object (as is the case) is created with the URL of the next page as the argument \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            return content
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        A row extraction is when there is a single row to be extracted and mapped to a set of headers. \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (101 > 79 characters)
Open

        The extract_links method basically generates ``XpathSelector``/``CssSelector`` objects for all of \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                pairs = izip(table_headers, values)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        The extract_links method basically generates ``XpathSelector``/``CssSelector`` objects for all of \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        else:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (134 > 79 characters)
Open

    def extract_columns(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

        """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                        if verbosity > 1:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            table_headers = [prefix + h + suffix for h in header]
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        For column extraction, this is a list of selectors for each column.
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                                content = default
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (99 > 79 characters)
Open

                raise Exception("Invalid %s selector for table header - %s" % (self.__selector_type__, header))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

            result_list = self.extract_columns(table_headers=table_headers, *args, **kwargs)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                from itertools import izip_longest
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                        r[head] = content
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Too many blank lines (2)
Open

    def extract_rows(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Separate top-level function and class definitions with two blank lines.

Method definitions inside a class are separated by a single blank
line.

Extra blank lines may be used (sparingly) to separate groups of
related functions.  Blank lines may be omitted between a bunch of
related one-liners (e.g. a set of dummy implementations).

Use blank lines in functions, sparingly, to indicate logical
sections.

Okay: def a():\n    pass\n\n\ndef b():\n    pass
Okay: def a():\n    pass\n\n\nasync def b():\n    pass
Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
Okay: default = 1\nfoo = 1
Okay: classify = 1\nfoo = 1

E301: class Foo:\n    b = 0\n    def bar():\n        pass
E302: def a():\n    pass\n\ndef b(n):\n    pass
E302: def a():\n    pass\n\nasync def b(n):\n    pass
E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
E303: def a():\n\n\n\n    pass
E304: @decorator\n\ndef a():\n    pass
E305: def a():\n    pass\na()
E306: def a():\n    def b():\n        pass\n    def c():\n        pass

Indentation contains tabs
Open

        except XPathError:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        try:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                        content = connector.join([make_ascii(x).strip() for x in val.itertext()])
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (83 > 79 characters)
Open

            raise Exception("Invalid %s selector - %s" % (self.__selector_type__, selector))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

        return result_list
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        try:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            columns = {}
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                    r = result.copy()
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                            except Exception:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        return result_list
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    from urlparse import urljoin
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (81 > 79 characters)
Open

                'Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                'Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains mixed spaces and tabs
Open

                'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Indentation contains tabs
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            raise Exception('The URL provided is invalid')
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Too many blank lines (2)
Open

    def extract_content(self, selector='', attr='', default='', connector='', *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Separate top-level function and class definitions with two blank lines.

Method definitions inside a class are separated by a single blank
line.

Extra blank lines may be used (sparingly) to separate groups of
related functions.  Blank lines may be omitted between a bunch of
related one-liners (e.g. a set of dummy implementations).

Use blank lines in functions, sparingly, to indicate logical
sections.

Okay: def a():\n    pass\n\n\ndef b():\n    pass
Okay: def a():\n    pass\n\n\nasync def b():\n    pass
Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
Okay: default = 1\nfoo = 1
Okay: classify = 1\nfoo = 1

E301: class Foo:\n    b = 0\n    def bar():\n        pass
E302: def a():\n    pass\n\ndef b(n):\n    pass
E302: def a():\n    pass\n\nasync def b(n):\n    pass
E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
E303: def a():\n\n\n\n    pass
E304: @decorator\n\ndef a():\n    pass
E305: def a():\n    pass\na()
E306: def a():\n    def b():\n        pass\n    def c():\n        pass

Line too long (87 > 79 characters)
Open

        :param default: The default value to be used if the selector does not return any data
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Line too long (88 > 79 characters)
Open

        :param connector: String connector for list of data returned for a particular selector
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

        """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (83 > 79 characters)
Open

            raise Exception("Invalid %s selector - %s" % (self.__selector_type__, selector))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

        """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                pairs = izip_longest(table_headers, values, fillvalue=default)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                    content = val.get(attr)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                result[head] = content
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            result_list.append(result)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Too many blank lines (2)
Open

    def extract_columns(self, result={}, selector='', table_headers=[], attr='', connector='', default='', verbosity=0, *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Separate top-level function and class definitions with two blank lines.

Method definitions inside a class are separated by a single blank
line.

Extra blank lines may be used (sparingly) to separate groups of
related functions.  Blank lines may be omitted between a bunch of
related one-liners (e.g. a set of dummy implementations).

Use blank lines in functions, sparingly, to indicate logical
sections.

Okay: def a():\n    pass\n\n\ndef b():\n    pass
Okay: def a():\n    pass\n\n\nasync def b():\n    pass
Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
Okay: default = 1\nfoo = 1
Okay: classify = 1\nfoo = 1

E301: class Foo:\n    b = 0\n    def bar():\n        pass
E302: def a():\n    pass\n\ndef b(n):\n    pass
E302: def a():\n    pass\n\nasync def b(n):\n    pass
E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
E303: def a():\n\n\n\n    pass
E304: @decorator\n\ndef a():\n    pass
E305: def a():\n    pass\na()
E306: def a():\n    def b():\n        pass\n    def c():\n        pass

Indentation contains tabs
Open

            elif type(selector) == list:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                    result_list.append(r)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                pass
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            headers['User-Agent'] = random.choice([
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains mixed spaces and tabs
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Line too long (129 > 79 characters)
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Continuation line missing indentation or outdented
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10; rv:33.0) Gecko/20100101 Firefox/33.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Continuation line missing indentation or outdented
Open

                'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2224.3 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Indentation contains tabs
Open

            self.content = requests.get(url, headers=headers).content
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            raise Exception("There is no content for the %s selector - %s" % (self.__selector_type__, selector))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        except Exception:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    def extract_tabular(self, header='', prefix='', suffix='', table_type='', *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            result_list = self.extract_rows(table_headers=table_headers, *args, **kwargs)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        return table_headers, result_list
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                    print("\nExtracting", head, "attribute", sep=' ', end='')
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                    content = content.replace("\n", " ").strip()
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (80 > 79 characters)
Open

            raise Exception("Selector expression string to be provided. Got " + selector)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                                content = connector.join([make_ascii(x).strip() for x in col.itertext()])
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    """
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            headers = {
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                'content-encoding': 'gzip', 
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Trailing whitespace
Open

                'content-encoding': 'gzip', 
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Trailing whitespace is superfluous.

The warning returned varies on whether the line itself is blank,
for easier filtering for those who want to indent their blank lines.

Okay: spam(1)\n#
W291: spam(1) \n#
W293: class Foo(object):\n    \n    bang = 12

Indentation contains tabs
Open

                'Accept-Encoding': 'identity, compress, gzip', 
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (95 > 79 characters)
Open

                'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10; rv:33.0) Gecko/20100101 Firefox/33.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2224.3 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (115 > 79 characters)
Open

                'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

            ])
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Continuation line missing indentation or outdented
Open

                'Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Continuation line missing indentation or outdented
Open

                'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Continuation line missing indentation or outdented
Open

                'Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Indentation contains tabs
Open

        try:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    def extract_links(self, selector='', *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                next_url = urljoin(self.url, link.get('href'))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Too many blank lines (2)
Open

    def extract_tabular(self, header='', prefix='', suffix='', table_type='', *args, **kwargs):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Separate top-level function and class definitions with two blank lines.

Method definitions inside a class are separated by a single blank
line.

Extra blank lines may be used (sparingly) to separate groups of
related functions.  Blank lines may be omitted between a bunch of
related one-liners (e.g. a set of dummy implementations).

Use blank lines in functions, sparingly, to indicate logical
sections.

Okay: def a():\n    pass\n\n\ndef b():\n    pass
Okay: def a():\n    pass\n\n\nasync def b():\n    pass
Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
Okay: default = 1\nfoo = 1
Okay: classify = 1\nfoo = 1

E301: class Foo:\n    b = 0\n    def bar():\n        pass
E302: def a():\n    pass\n\ndef b(n):\n    pass
E302: def a():\n    pass\n\nasync def b(n):\n    pass
E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
E303: def a():\n\n\n\n    pass
E304: @decorator\n\ndef a():\n    pass
E305: def a():\n    pass\na()
E306: def a():\n    def b():\n        pass\n    def c():\n        pass

Indentation contains tabs
Open

        :param header: The headers to be used for the table. This can be a list of headers, or a selector that gives the list of headers
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            raise Exception("Specify 'rows' or 'columns' in table_type")
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (83 > 79 characters)
Open

            result_list = self.extract_columns(table_headers=table_headers, *args, **kwargs)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

            raise Exception("Selector expression string to be provided. Got " + selector)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            try:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (81 > 79 characters)
Open

                                content = connector.join([make_ascii(x).strip() for x in col.itertext()])
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

                        else:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                            content = col.get(attr)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    def __init__(self, url):
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                'Accept': '*/*'
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                'Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Continuation line missing indentation or outdented
Open

                'Mozilla/5.0 (Windows NT 5.1; rv:34.0) Gecko/20100101 Firefox/34.0',
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Indentation contains tabs
Open

        except requests.exceptions.InvalidURL:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                tag = self.get_tree_tag(selector=selector, get_one=True)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (103 > 79 characters)
Open

            raise Exception("There is no content for the %s selector - %s" % (self.__selector_type__, selector))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Line too long (82 > 79 characters)
Open

        are iterated through. The relative paths are converted into absolute paths and \
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

        except XPathError:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            raise Exception("Invalid %s selector - %s" % (self.__selector_type__, selector))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

            raise Exception("Invalid %s selector - %s" % (self.__selector_type__, selector))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (99 > 79 characters)
Open

                raise Exception("Invalid %s selector for table header - %s" % (self.__selector_type__, header))
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains tabs
Open

        except XPathError:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                        col = columns[head][i]
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

                            try:
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

There are no issues that match your filters.

Category
Status