This commit was merged in pull request #2.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user