Skip to content

Commit

Permalink
update scraping for new forum HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
ccbrown committed Dec 9, 2017
1 parent f3a9d34 commit b548ffa
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 126 deletions.
2 changes: 1 addition & 1 deletion server/forum_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func (indexer *ForumIndexer) index(poster string, timezone *time.Location) {
}

func ScrapeForumTimezone(doc *goquery.Document) (*time.Location, error) {
sel := doc.Find("#timezone option[selected]")
sel := doc.Find(`select[name="preferences[timezone]"] option[selected]`)
if sel == nil || sel.AttrOr("value", "") == "" {
return nil, errors.New("unable to find timezone selection")
}
Expand Down
Loading

0 comments on commit b548ffa

Please sign in to comment.