Skip to content

Commit aedad81

Browse files
committed
Turns out watchers list isn't zero indexed, but now you can't trust that page 1 displays the same as the default page if there are no watchers
1 parent 0b9d51f commit aedad81

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/faexport/scraper.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,11 @@ def user(name)
563563

564564
def budlist(name, page, is_watchers)
565565
mode = is_watchers ? "to" : "by"
566-
url = "watchlist/#{mode}/#{escape(name)}/#{page}/"
566+
if page == 1
567+
url = "watchlist/#{mode}/#{escape(name)}/"
568+
else
569+
url = "watchlist/#{mode}/#{escape(name)}/#{page}/"
570+
end
567571
html = fetch(url)
568572

569573
html.at_css("td.alt1").css(".c-usernameBlockSimple__displayName").map(&:content)

0 commit comments

Comments
 (0)