Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
url-checker
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
url-checker
Commits
04640c07
Commit
04640c07
authored
Oct 15, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide hostname and resolver info
parent
01ff7ab4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
setup.py
setup.py
+1
-0
urlchecker_http.py
urlchecker_http.py
+6
-1
No files found.
setup.py
View file @
04640c07
...
@@ -13,6 +13,7 @@ setup(
...
@@ -13,6 +13,7 @@ setup(
"forcediphttpsadapter"
,
"forcediphttpsadapter"
,
"peewee>2.10.1"
,
"peewee>2.10.1"
,
"click>=7.0"
,
"click>=7.0"
,
"dnspython"
,
],
],
entry_points
=
{
entry_points
=
{
"console_scripts"
:
[
"urlchecker=urlchecker_cli:runUrlChecker "
]
"console_scripts"
:
[
"urlchecker=urlchecker_cli:runUrlChecker "
]
...
...
urlchecker_http.py
View file @
04640c07
...
@@ -5,9 +5,10 @@ import sys
...
@@ -5,9 +5,10 @@ import sys
import
traceback
import
traceback
import
time
import
time
from
forcediphttpsadapter.adapters
import
ForcedIPHTTPSAdapter
from
forcediphttpsadapter.adapters
import
ForcedIPHTTPSAdapter
import
dns.resolver
__version__
=
"0.0.
2
"
__version__
=
"0.0.
3
"
PREFERRED_TYPE
=
"text/html"
PREFERRED_TYPE
=
"text/html"
TIMEOUT
=
2
TIMEOUT
=
2
...
@@ -104,6 +105,10 @@ class WebBot:
...
@@ -104,6 +105,10 @@ class WebBot:
def
run
(
self
,
url
):
def
run
(
self
,
url
):
print
(
time
.
strftime
(
"%Y-%m-%d %H:%M:%S"
))
print
(
time
.
strftime
(
"%Y-%m-%d %H:%M:%S"
))
print
(
"Hostname"
,
socket
.
gethostname
())
myresolver
=
dns
.
resolver
.
Resolver
()
print
(
"Resolvers"
,
myresolver
.
nameservers
)
try
:
try
:
self
.
check
(
url
)
self
.
check
(
url
)
except
KeyboardInterrupt
:
except
KeyboardInterrupt
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment