mtlevolio / pylinkchecker Goto Github PK
View Code? Open in Web Editor NEWstandalone and pure python link checker and crawler that traverses a web site and reports errors
License: Other
standalone and pure python link checker and crawler that traverses a web site and reports errors
License: Other
(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?
Hello,
Is there an argument to configure a delay value between server pings?
Thank you.
The default python html parser is ok, but better parser exists.
ERROR Crawled 1 urls with 1 error(s) in 0.00 seconds
Start URL(s): http://site
None: http://site
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?
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.
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.
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.)
When crawling outside links, ignore non-http schemes such as tel:, mailto:, ftp:
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?
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
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!
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!
↳ pip install pylinkchecker
Collecting pylinkchecker
Could not find a version that satisfies the requirement pylinkchecker (from versions: )
No matching distribution found for pylinkchecker
A pip install is not possible.
The package does exist on Pypi, but with a different GitHub address:
https://pypi.python.org/pypi/pylinkchecker/0.2
Here's the address it points to: https://github.com/auto123/pylinkchecker
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.