mediawiki-utilities/python-mwchatter

Parse is Returning Scrambled Comments

ewhit51 opened this issue · 0 comments

When I run cleaned = parse(page), the comments inside of cleaned are not in the order in which they appear on the original page. I am currently unsure where the error is happening in the code, I can only tell that it is happening.

Example:

Original talk page:

As seen here and here, I twice reverted content that Swingoswingo added. With that second revert, you can see that Swingoswingo changed the material so that it's not focused on the professor. For that second edit, I only reverted the "it is said to endanger the health of future generation" part. I reverted both times due to the fact that commentary from a lone professor in a section that is specifically about religious views is WP:Undue weight. Not only was the original content not speaking of any religious view, it was simply stating that it is common in the Muslim world for men to marry their nieces and cousins and that it endangers the health of future generations. Health with regard to incest is already covered in the article, with better/more appropriate sources. It's also covered in the lead. Readers know that incest can lead to genetic problems. We don't need the inclusion of professor Steve Jones stating that it endangers the health of future generations. Furthermore, that health commentary is vague.

The Emir of Wikipedia account re-added Professor Steve Jones's name; I'm sure he did this per WP:Intext.

I object to all versions. Thoughts? This is something that may need to be taken to the WP:Neutral noticeboard. I state this noticeboard because WP:Undue weight is an aspect of WP:Neutral and there is no WP:Undue weight noticeboard. Flyer22 Reborn (talk) 21:38, 4 August 2017 (UTC)

I added the name as I believed that is was not a unanimously held opinion as it claims that Muslims marry nieces but above it says this is forbidden. Intext attribution should be used in this case. Emir of Wikipedia (talk) 22:30, 4 August 2017 (UTC)
In-text attribution is not what I object to; above, I was indicating that I understand why you added the name. But the in-text attribution in this case certainly signals WP:Undue weight. Flyer22 Reborn (talk) 23:04, 4 August 2017 (UTC)
We don't need to go to any noticeboard. We are enough here to solve it. Swingoswingo (talk) 14:09, 5 August 2017 (UTC)
If and when we get additional sources for the same claim, intext wont be necessary anymore :) Swingoswingo (talk) 14:14, 5 August 2017 (UTC)
What more I can think of is moving most of the Steve Jones words into the quote= parameter of the cite template. Swingoswingo (talk) 14:14, 5 August 2017 (UTC)
We do need to go to a noticeboard since the content is disputed and the matter is not resolved in any way here. It's not like I will be agreeing with the addition. So I will now be taking the matter to the aforementioned noticeboard; hopefully, some editors will weigh in on the matter there or here. Flyer22 Reborn (talk) 14:17, 6 August 2017 (UTC)
@Acroterion: You reverted content being discussed here. Emir of Wikipedia (talk) 13:46, 7 August 2017 (UTC)
I reverted an unexplained removal by abn IP of sourced material in an article prone to vandalism. If a consensus is established here for a sourced change, feel free to make the change. I have no opinion in the matter, I am not following this discussion. Acroterion (talk) 16:16, 7 August 2017 (UTC)
This is Acroterion's revert. If no one weighs in at the noticeboard on the content, I'll simply start a WP:RfC on it. Flyer22 Reborn (talk) 22:31, 7 August 2017 (UTC)
Albeit cousin marriage is common in the Middle East as much more sources discuss in the article and in other pages, the claim that people marry their nieces is unfounded. There is no such claim except for his one guy. You can try to look in more sources like scientific journals or books. You won't find such claim. One hyperbolic claim by one guy who seems to have made it out of political inclination should not be seen as reliable. The source and the claim should be removed altogether. You can start a WP:RfC It's very easy to come to the conclusion that uncle to niece relationships are not just illegal but they are also not common in the middle east. CaliphoShah (talk) 07:18, 18 August 2017 (UTC)

what parse returns:
'heading': ' External links modified ',
'subsections': []},
{'comments': [{'author': 'Flyer22 Reborn',
'comments': [{'author': 'Emir of Wikipedia',
'comments': [{'author': 'Flyer22 Reborn',
'comments': [{'author': 'Swingoswingo',
'comments': [],
'cosigners': [],
'text_blocks': [":::We don't need to go to any noticeboard. We are enough here to solve it. [[User:Swingoswingo|Swingoswingo]] ([[User talk:Swingoswingo|talk]]) 14:09, 5 August 2017 (UTC)\n"],
'time_stamp': '14:09, 5 August 2017 (UTC)'},
{'author': 'Swingoswingo',
'comments': [],
'cosigners': [],
'text_blocks': [':::If and when we get additional sources for the same claim, intext wont be necessary anymore :) [[User:Swingoswingo|Swingoswingo]] ([[User talk:Swingoswingo|talk]]) 14:14, 5 August 2017 (UTC)\n'],
'time_stamp': '14:14, 5 August 2017 (UTC)'},
{'author': 'Swingoswingo',
'comments': [{'author': 'Flyer22 Reborn',
'comments': [],
'cosigners': [],
'text_blocks': ['\n',
"::::We do need to go to a noticeboard since the content is disputed and the matter is not resolved in any way here. It's not like I will be agreeing with the addition. So I will now be taking the matter to the aforementioned noticeboard; hopefully, some editors will weigh in on the matter there or here. [[User:Flyer22 Reborn|Flyer22 Reborn]] ([[User talk:Flyer22 Reborn|talk]]) 14:17, 6 August 2017 (UTC)\n"],
'time_stamp': '14:17, 6 August 2017 (UTC)'}],
'cosigners': [],
'text_blocks': [':::What more I can think of is moving most of the Steve Jones words into the quote= parameter of the cite template. [[User:Swingoswingo|Swingoswingo]] ([[User talk:Swingoswingo|talk]]) 14:14, 5 August 2017 (UTC)\n'],
'time_stamp': '14:14, 5 August 2017 (UTC)'}],
'cosigners': [],
'text_blocks': ['\n',
'::In-text attribution is not what I object to; above, I was indicating that I understand why you added the name. But the in-text attribution in this case certainly signals WP:Undue weight. [[User:Flyer22 Reborn|Flyer22 Reborn]] ([[User talk:Flyer22 Reborn|talk]]) 23:04, 4 August 2017 (UTC)\n'],
'time_stamp': '23:04, 4 August 2017 (UTC)'}],
'cosigners': [],
'text_blocks': [':I added the name as I believed that is was not a unanimously held opinion as it claims that Muslims marry nieces but above it says this is forbidden. Intext attribution should be used in this case. [[User:Emir of Wikipedia|Emir of Wikipedia]] ([[User talk:Emir of Wikipedia|talk]]) 22:30, 4 August 2017 (UTC)\n'],
'time_stamp': '22:30, 4 August 2017 (UTC)'},
{'author': 'Emir of Wikipedia',
'comments': [],
'cosigners': [],
'text_blocks': ['\n',
':{{ping|Acroterion}} You reverted content being discussed here. [[User:Emir of Wikipedia|Emir of Wikipedia]] ([[User talk:Emir of Wikipedia|talk]]) 13:46, 7 August 2017 (UTC)\n'],
'time_stamp': '13:46, 7 August 2017 (UTC)'},
{'author': 'Acroterion',
'comments': [],
'cosigners': [],
'text_blocks': [':I reverted an unexplained removal by abn IP of sourced material in an article prone to vandalism. If a consensus is established here for a sourced change, feel free to make the change. I have no opinion in the matter, I am not following this discussion. '''[[User:Acroterion|Acroterion]] [[User talk:Acroterion|(talk)]]''' 16:16, 7 August 2017 (UTC)\n'],
'time_stamp': '16:16, 7 August 2017 (UTC)'},
{'author': 'Flyer22 Reborn',
'comments': [],
'cosigners': [],
'text_blocks': ['\n',
":[https://en.wikipedia.org/w/index.php?title=Incest&diff=794338344&oldid=794328868 This] is Acroterion's revert. If no one weighs in at the noticeboard on the content, I'll simply start a [[WP:RfC]] on it. [[User:Flyer22 Reborn|Flyer22 Reborn]] ([[User talk:Flyer22 Reborn|talk]]) 22:31, 7 August 2017 (UTC)\n"],
'time_stamp': '22:31, 7 August 2017 (UTC)'}],
'cosigners': [],
'text_blocks': ['== Professor Steve Jones material and [[WP:Undue weight]] ==\n',
'\n',
'As seen [https://en.wikipedia.org/w/index.php?title=Incest&diff=793175217&oldid=793089848 here] and [https://en.wikipedia.org/w/index.php?title=Incest&diff=793801740&oldid=793688719 here], I twice reverted content that [[User:Swingoswingo|Swingoswingo]] [https://en.wikipedia.org/w/index.php?title=Incest&diff=792813974&oldid=792688041 added]. With that second revert, you can see that Swingoswingo [https://en.wikipedia.org/w/index.php?title=Incest&diff=793688548&oldid=793584527 changed the material] so that it's not focused on the professor. For that second edit, I only reverted the "it is said to endanger the health of future generation" part. I reverted both times due to the fact that commentary from a lone professor in a section that is specifically about religious views is [[WP:Undue weight]]. Not only was the original content not speaking of any religious view, it was simply stating that it is common in the Muslim world for men to marry their nieces and cousins and that it endangers the health of future generations. Health with regard to incest is [https://en.wikipedia.org/w/index.php?title=Incest&oldid=793863930#Inbreeding already covered in the article], with better/more appropriate sources. It's also covered in the lead. Readers know that incest can lead to genetic problems. We don't need the inclusion of professor Steve Jones stating that it endangers the health of future generations. Furthermore, that health commentary is vague. \n',
'\n',
"The [[User:Emir of Wikipedia|Emir of Wikipedia]] account [https://en.wikipedia.org/w/index.php?title=Incest&diff=793861653&oldid=793801740 re-added] Professor Steve Jones's name; I'm sure he did this per [[WP:Intext]]. \n",
'\n',
'I object to all versions. Thoughts? This is something that may need to be taken to the [[WP:Neutral noticeboard]]. I state this noticeboard because WP:Undue weight is an aspect of WP:Neutral and there is no WP:Undue weight noticeboard. [[User:Flyer22 Reborn|Flyer22 Reborn]] ([[User talk:Flyer22 Reborn|talk]]) 21:38, 4 August 2017 (UTC)\n'],
'time_stamp': '21:38, 4 August 2017 (UTC)'},
{'author': 'CaliphoShah',
'comments': [],
'cosigners': [],
'text_blocks': ["Albeit cousin marriage is common in the Middle East as much more sources discuss in the article and in other pages, the claim that people marry their nieces is unfounded. There is no such claim except for his one guy. You can try to look in more sources like scientific journals or books. You won't find such claim. One hyperbolic claim by one guy who seems to have made it out of political inclination should not be seen as reliable. The source and the claim should be removed altogether. You can start a [[WP:RfC]] It's very easy to come to the conclusion that uncle to niece relationships are not just illegal but they are also not common in the middle east. [[User:CaliphoShah|CaliphoShah]] ([[User talk:CaliphoShah|talk]]) 07:18, 18 August 2017 (UTC)\n"],
'time_stamp': '07:18, 18 August 2017 (UTC)'},
{'comments': [], 'cosigners': [], 'text_blocks': ['\n']}],
'heading': ' Professor Steve Jones material and [[WP:Undue weight]] ',
'subsections': []},
{'comments': [{'author': 'InternetArchiveBot',
'comments': [],

Apologies for the indentations