Bugfix
All checks were successful
Integration Tests / test (pull_request) Successful in 53s

This commit was merged in pull request #2.
This commit is contained in:
2026-03-05 20:06:01 -06:00
parent e2088e0541
commit efc227ac90
2 changed files with 8 additions and 7 deletions

View File

@@ -382,7 +382,7 @@ func TestOSRS_GetPageSection_MiningTraining_FirstSection(t *testing.T) {
}
func TestRS3_GetPage_PrayerTraining_Sections(t *testing.T) {
page, err := rs3Client().GetPage("Prayer training")
page, err := rs3Client().GetPage("Pay-to-play Prayer training")
if err != nil {
t.Fatalf("GetPage failed: %v", err)
}
@@ -396,7 +396,7 @@ func TestRS3_GetPage_PrayerTraining_Sections(t *testing.T) {
}
func TestRS3_GetPageSection_PrayerTraining_BonesSection(t *testing.T) {
page, err := rs3Client().GetPage("Prayer training")
page, err := rs3Client().GetPage("Pay-to-play Prayer training")
if err != nil {
t.Fatalf("GetPage failed: %v", err)
}
@@ -406,7 +406,7 @@ func TestRS3_GetPageSection_PrayerTraining_BonesSection(t *testing.T) {
t.Skip("no bones/altars section found")
}
section, err := rs3Client().GetPageSection("Prayer training", idx)
section, err := rs3Client().GetPageSection("Pay-to-play Prayer training", idx)
if err != nil {
t.Fatalf("GetPageSection failed: %v", err)
}

View File

@@ -72,10 +72,11 @@ func (c *Client) GetPage(title string) (*ParsedPage, error) {
// GetPageSection fetches the wikitext for a specific section of a page.
func (c *Client) GetPageSection(title string, sectionIndex int) (*ParsedPage, error) {
params := url.Values{
"action": {"parse"},
"page": {title},
"prop": {"wikitext"},
"section": {strconv.Itoa(sectionIndex)},
"action": {"parse"},
"page": {title},
"prop": {"wikitext"},
"section": {strconv.Itoa(sectionIndex)},
"redirects": {"1"},
}
var resp parseResponse