Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Armory Dashboard
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anton Sarukhanov
Armory Dashboard
Commits
1ad43aa0
Commit
1ad43aa0
authored
7 years ago
by
Anton Sarukhanov
Browse files
Options
Downloads
Patches
Plain Diff
Fix refresh, autosubmit select, handle errors.
parent
c2893bea
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
scrape.py
+8
-5
8 additions, 5 deletions
scrape.py
templates/index.html
+1
-1
1 addition, 1 deletion
templates/index.html
templates/live.html
+1
-1
1 addition, 1 deletion
templates/live.html
with
10 additions
and
7 deletions
scrape.py
+
8
−
5
View file @
1ad43aa0
...
...
@@ -15,11 +15,14 @@ def scrape(results_url):
event_urls
=
results_tree
.
xpath
(
'
//div[@id=
"
schedule
"
]/table/tr/td/a[text()=
"
View
"
]/@href
'
)
except
IndexError
:
return
"
No event schedule found
"
tournament_name
=
results_tree
.
xpath
(
'
//span[@class=
"
tournName
"
]/text()
'
)[
0
]
tournament_details
=
results_tree
.
xpath
(
'
//span[@class=
"
tournDetails
"
]/text()
'
)[
0
]
return
"
No event schedule found.
"
try
:
tournament_name
=
results_tree
.
xpath
(
'
//span[@class=
"
tournName
"
]/text()
'
)[
0
]
tournament_details
=
results_tree
.
xpath
(
'
//span[@class=
"
tournDetails
"
]/text()
'
)[
0
]
except
IndexError
:
return
"
Tournament info not found.
"
events
=
[]
for
event_url
in
event_urls
:
if
not
urlparse
(
event_url
).
netloc
:
...
...
This diff is collapsed.
Click to expand it.
templates/index.html
+
1
−
1
View file @
1ad43aa0
...
...
@@ -10,7 +10,7 @@
<p>
<form
action=
"{{ url_for('live') }}"
method=
"get"
>
<label>
Live Results URL:
<select
name=
"results_url"
>
<select
name=
"results_url"
onchange=
"this.form.submit()"
>
<option
value=
""
selected
disabled
>
-- Select One --
</option>
<optgroup
label=
"Escrime Management"
>
<option
value=
"http://escrimeresults.com/tournaments/NCAA.html"
>
NCAA
</option>
...
...
This diff is collapsed.
Click to expand it.
templates/live.html
+
1
−
1
View file @
1ad43aa0
{% extends "base.html" %}
{% block extra_head %}
<meta
http-equiv=
"refresh"
content=
"60; URL={{
url_for('live')
}}"
>
<meta
http-equiv=
"refresh"
content=
"60; URL={{
request.url
}}"
>
{% endblock extra_head %}
{% block content %}
<header>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment