Giter VIP home page Giter VIP logo

pylinkchecker's People

Contributors

dorivard avatar jerryker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pylinkchecker's Issues

Python3 support missing

(venv) jannek@jannek-P720:/ssd/pylinkchecker$ python setup.py install
running install
/ssd/pylinkchecker/venv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/ssd/pylinkchecker/venv/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
creating pylinkchecker.egg-info
writing pylinkchecker.egg-info/PKG-INFO
writing dependency_links to pylinkchecker.egg-info/dependency_links.txt
writing requirements to pylinkchecker.egg-info/requires.txt
writing top-level names to pylinkchecker.egg-info/top_level.txt
writing manifest file 'pylinkchecker.egg-info/SOURCES.txt'
reading manifest file 'pylinkchecker.egg-info/SOURCES.txt'
adding license file 'LICENSE.txt'
writing manifest file 'pylinkchecker.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/pylinkchecker
copying pylinkchecker/compat.py -> build/lib/pylinkchecker
copying pylinkchecker/__init__.py -> build/lib/pylinkchecker
copying pylinkchecker/api.py -> build/lib/pylinkchecker
copying pylinkchecker/crawler.py -> build/lib/pylinkchecker
copying pylinkchecker/tests.py -> build/lib/pylinkchecker
copying pylinkchecker/models.py -> build/lib/pylinkchecker
copying pylinkchecker/reporter.py -> build/lib/pylinkchecker
copying pylinkchecker/urlutil.py -> build/lib/pylinkchecker
creating build/lib/pylinkchecker/bs4
copying pylinkchecker/bs4/diagnose.py -> build/lib/pylinkchecker/bs4
copying pylinkchecker/bs4/dammit.py -> build/lib/pylinkchecker/bs4
copying pylinkchecker/bs4/__init__.py -> build/lib/pylinkchecker/bs4
copying pylinkchecker/bs4/element.py -> build/lib/pylinkchecker/bs4
creating build/lib/pylinkchecker/bs4/builder
copying pylinkchecker/bs4/builder/__init__.py -> build/lib/pylinkchecker/bs4/builder
copying pylinkchecker/bs4/builder/_htmlparser.py -> build/lib/pylinkchecker/bs4/builder
copying pylinkchecker/bs4/builder/_lxml.py -> build/lib/pylinkchecker/bs4/builder
copying pylinkchecker/bs4/builder/_html5lib.py -> build/lib/pylinkchecker/bs4/builder
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/pylinkchecker
copying build/lib/pylinkchecker/compat.py -> build/bdist.linux-x86_64/egg/pylinkchecker
copying build/lib/pylinkchecker/__init__.py -> build/bdist.linux-x86_64/egg/pylinkchecker
copying build/lib/pylinkchecker/api.py -> build/bdist.linux-x86_64/egg/pylinkchecker
copying build/lib/pylinkchecker/crawler.py -> build/bdist.linux-x86_64/egg/pylinkchecker
copying build/lib/pylinkchecker/tests.py -> build/bdist.linux-x86_64/egg/pylinkchecker
creating build/bdist.linux-x86_64/egg/pylinkchecker/bs4
copying build/lib/pylinkchecker/bs4/diagnose.py -> build/bdist.linux-x86_64/egg/pylinkchecker/bs4
copying build/lib/pylinkchecker/bs4/dammit.py -> build/bdist.linux-x86_64/egg/pylinkchecker/bs4
copying build/lib/pylinkchecker/bs4/__init__.py -> build/bdist.linux-x86_64/egg/pylinkchecker/bs4
creating build/bdist.linux-x86_64/egg/pylinkchecker/bs4/builder
copying build/lib/pylinkchecker/bs4/builder/__init__.py -> build/bdist.linux-x86_64/egg/pylinkchecker/bs4/builder
copying build/lib/pylinkchecker/bs4/builder/_htmlparser.py -> build/bdist.linux-x86_64/egg/pylinkchecker/bs4/builder
copying build/lib/pylinkchecker/bs4/builder/_lxml.py -> build/bdist.linux-x86_64/egg/pylinkchecker/bs4/builder
copying build/lib/pylinkchecker/bs4/builder/_html5lib.py -> build/bdist.linux-x86_64/egg/pylinkchecker/bs4/builder
copying build/lib/pylinkchecker/bs4/element.py -> build/bdist.linux-x86_64/egg/pylinkchecker/bs4
copying build/lib/pylinkchecker/models.py -> build/bdist.linux-x86_64/egg/pylinkchecker
copying build/lib/pylinkchecker/reporter.py -> build/bdist.linux-x86_64/egg/pylinkchecker
copying build/lib/pylinkchecker/urlutil.py -> build/bdist.linux-x86_64/egg/pylinkchecker
byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/compat.py to compat.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/__init__.py to __init__.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/api.py to api.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/crawler.py to crawler.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/tests.py to tests.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/bs4/diagnose.py to diagnose.cpython-310.pyc
  File "build/bdist.linux-x86_64/egg/pylinkchecker/bs4/diagnose.py", line 20
    print "Diagnostic running on Beautiful Soup %s" % __version__
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/bs4/dammit.py to dammit.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/bs4/__init__.py to __init__.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/bs4/builder/__init__.py to __init__.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/bs4/builder/_htmlparser.py to _htmlparser.cpython-310.pyc
  File "build/bdist.linux-x86_64/egg/pylinkchecker/bs4/builder/_htmlparser.py", line 71
    except (ValueError, OverflowError), e:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized

byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/bs4/builder/_lxml.py to _lxml.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/bs4/builder/_html5lib.py to _html5lib.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/bs4/element.py to element.cpython-310.pyc
  File "build/bdist.linux-x86_64/egg/pylinkchecker/bs4/element.py", line 1204
    print 'Running CSS selector "%s"' % selector
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/models.py to models.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/reporter.py to reporter.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/pylinkchecker/urlutil.py to urlutil.cpython-310.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/scripts-3.10
copying and adjusting pylinkchecker/bin/pylinkcheck.py -> build/scripts-3.10
changing mode of build/scripts-3.10/pylinkcheck.py from 664 to 775
creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.10/pylinkcheck.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/pylinkcheck.py to 775
copying pylinkchecker.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pylinkchecker.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pylinkchecker.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pylinkchecker.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pylinkchecker.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
pylinkchecker.__pycache__.tests.cpython-310: module references __file__
creating dist
creating 'dist/pylinkchecker-0.2-py3.10.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing pylinkchecker-0.2-py3.10.egg
creating /ssd/pylinkchecker/venv/lib/python3.10/site-packages/pylinkchecker-0.2-py3.10.egg
Extracting pylinkchecker-0.2-py3.10.egg to /ssd/pylinkchecker/venv/lib/python3.10/site-packages
  File "/ssd/pylinkchecker/venv/lib/python3.10/site-packages/pylinkchecker-0.2-py3.10.egg/pylinkchecker/bs4/diagnose.py", line 20
    print "Diagnostic running on Beautiful Soup %s" % __version__
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

  File "/ssd/pylinkchecker/venv/lib/python3.10/site-packages/pylinkchecker-0.2-py3.10.egg/pylinkchecker/bs4/element.py", line 1204
    print 'Running CSS selector "%s"' % selector
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

  File "/ssd/pylinkchecker/venv/lib/python3.10/site-packages/pylinkchecker-0.2-py3.10.egg/pylinkchecker/bs4/builder/_htmlparser.py", line 71
    except (ValueError, OverflowError), e:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized

Very likely that some dependency needs now updating?

Doesn't Seem to Crawl

I'm probably missing something obvious. When I run:
pylinkcheck.py -P localhost:6464 I only see output for links and images on the index page and not output from the pages it links to. Does this run recursively? Am I missing an option?

Add a strict mode

If in strict mode, take the url as is. Otherwise, strip it of leading and trailing whitespaces.

In the future, we may do more url transformations if not in strict mode to ensure that we treat the page like a browser.

Add sphinx documentation

Now that we have an API, it makes sense to get more documentation than the single README file (which is already quite heavy).

It might be a good time to use read the docs.

providing an API to use pylinkchecker as a python module

It could be nice to have a public API, so pylinkchecker could be easily used as a python module.

For example:
import pylinkchecker

checker = pylinkchecker.Checker("http://website.tld")
checker.crawl() #do requests and parse responses
checker.errors() #get error requests (4xx, 5xx)
checker.success() #get 2xx requests
checker.errors().to_html() #return a string of html of the error requests

(This is just a draft.)

Hammer prevention

I can't find anything obvious in the docs for this, but any built-in functionality to control how fast it moves from URL to the next? Basically a small delay to prevent "hammering" a server?

Ignore Telephone Links

Is there a way to enable the linkchecker to ignore telephone links? For a site with the following link:

<a href="tel:18002524793"><span>Assisted Living<br>Sales Office</span>1-800-252-4793</a>

The linkchecker attempts to crawl http://www.theosborn.org/tel:18006732926 which returns 404. The sites my company run have multiple telephone links. This site in particular has 6 telephone links in a sidebar that renders on every single page, which results in quite a few false positives:

ERROR Crawled 1049 urls with 504 error(s) in 126.18 seconds

Recursion/depth level

Is it possible to restrict this from scanning too deeply into a site?

If I wanted to hack this in myself where would I start looking?

Thanks!

Wheel or source pushed to PyPi

Any chance on getting a wheel and/or source pushed to PyPi so we can install with pip?

python setup.py sdist bdist_wheel upload

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.