Skip to content

Commit

Permalink
Merge pull request #449 from RobertDeRose/bugfix/update-torrenday
Browse files Browse the repository at this point in the history
Updated TorrentDay definition
  • Loading branch information
lxt2 committed Apr 25, 2020
2 parents dfbf73b + 801a2b2 commit 4ad57c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions definitions/torrentday.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@
inputs:
$raw: "{{range .Categories}}{{.}}&{{end}}q={{ .Query.Keywords }}"
rows:
selector: table#torrentTable > tbody > tr:nth-child(n+2):has(td.t_label)
selector: table#torrentTable > tbody > tr:nth-child(n+2):has(td.torrentNameInfo)
fields:
category:
selector: td.t_label > a
selector: td:nth-child(1) > a
attribute: href
filters:
- name: regexp
Expand Down
8 changes: 6 additions & 2 deletions indexer/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,12 @@ func (r *Runner) testURLWorks(u string) bool {
r.logger.WithError(err).Warn("URL check failed")
return false
} else if r.browser.StatusCode() != http.StatusOK {
r.logger.Warn("URL returned non-ok status")
return false
if r.browser.Title() == "Just a moment..." {
r.logger.Warn("Found cloudflare check, assuming OK")
} else {
r.logger.Warn("URL returned non-ok status")
return false
}
}

return true
Expand Down

0 comments on commit 4ad57c5

Please sign in to comment.