Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing 'office' for Rajesh Sonkar #530

Closed
tmtmtmtm opened this issue May 5, 2023 · 4 comments
Closed

Missing 'office' for Rajesh Sonkar #530

tmtmtmtm opened this issue May 5, 2023 · 4 comments

Comments

@tmtmtmtm
Copy link

tmtmtmtm commented May 5, 2023

With version 10.1.4, when I run wtf_wikipedia Rajesh Sonkar it's failing to pick up the "office" line from the infobox:

| name                = Dr. Rajesh Sonkar
| image               = 
| birth_date          = {{Birth date and age|df=y|1968|12|9}}
| birth_place         = [[Indore]], [[Madhya Pradesh]], [[India]]
| office              = [[President Bhartiya Janta Party(BJP) Indore, Madhya Pradesh]]
| term_start          = 10 May 2020
| term_end            = 
| constituency        = 
| succeeded           = 
| party               = [[Bharatiya Janata Party]]

        {
          "name": {
            "text": "Dr. Rajesh Sonkar"
          },
          "birth_date": {
            "text": "December 9, 1968"
          },
          "birth_place": {
            "text": "Indore, Madhya Pradesh, India",
            "links": [
              {
                "type": "internal",
                "page": "Indore"
              },
              {
                "type": "internal",
                "page": "Madhya Pradesh"
              },
              {
                "type": "internal",
                "page": "India"
              }
            ]
          },
          "term_start": {
            "text": "10 May 2020"
          },
          "party": {
            "text": "Bharatiya Janata Party",
            "links": [
              {
                "type": "internal",
                "page": "Bharatiya Janata Party"
              }
            ]
          },
@spencermountain
Copy link
Owner

hey Tony, this works for me
can you reproduce it?
cheers

@tmtmtmtm
Copy link
Author

tmtmtmtm commented May 5, 2023

Oh, this is a bit more interesting than I noticed at first. Looks like it's because there's an additional "Office" line later in the infobox: https://runkit.com/tmtmtmtm/645528e391100800088f1cb5

On-wiki 'office' and 'Office' appear to be treated as different, with the second ignored as an unknown parameter, whereas wtf_wikipedia presumably handles them case-insensitively, so the second clobbers the first.

@spencermountain
Copy link
Owner

oh my gosh, good catch.
will add a fix to the next release
thanks

spencermountain added a commit that referenced this issue May 11, 2023
@spencermountain spencermountain mentioned this issue May 11, 2023
Merged
@spencermountain
Copy link
Owner

fixed in 10.1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants