Earlier quoted context omitted.
The infoboxes aren't standardized at all. The HTML they generate is.
Hehe-- I am going to rankly speculate nearly all of them follow an obvious standard of key/value pairs where the key is a string. And then there are like two or three subcultures on Wikipedia that put rando stuff in there and would troll to the death before being forced to change the their infobox class to "rando_box" or whatever negligible effort it would take them if a standard were to be enforced. Am I anywhere cl…
Data-Mining Wikipedia for Fun and Profit
71–80 of 100 posts
Re: Data-Mining Wikipedia for Fun and Profit
#72Earlier quoted context omitted.
IANAL but since the pages are published under Creative Commons Attribution-ShareAlike, if someone wishes to collect the text on the basis of the HTML version then there's not much you can do about it. Wikimedia no doubt have caching, CDNs and all that jazz in place so the likely impact on infrastructure is probably de-minimis in the grand scheme of things (the thousands or millions of humans who visit the site every…
>IANAL but since the pages are published under Creative Commons Attribution-ShareAlike, if someone wishes to collect the text on the basis of the HTML version then there's not much you can do about it. They said please don't, not don't do it or they'll sue you. But content license and site terms of use are different things. From their terms of use you aren’t allowed to > [Disrupt] the services by placing an undue bur…
As a general rule, make your scraper non-paralell, and put a user-agent that has contact details in the event of an issue, and you're probably all good.
After all wikipedia is meant to be used. Don't be unduly disruptive, don't scrape 20 million pages, but scraping a couple thousand is totally acceptable.
Source: used to work for wikimedia, albeit not in the sre dept. My opinions are of course totally my own.
Re: Data-Mining Wikipedia for Fun and Profit
#73Has anyone found an easy way to expand their templates without using their whole stack? I tried getting Lua templates working from Python but didn't get very far...
Parsoid[1] is what you'd want for that, most likely. It's the new wikitext parser that MediaWiki is gradually switching over to, but it has the virtue of being usable entirely outside of MediaWiki if you need to. [1]: https://www.mediawiki.org/wiki/Parsoid
Re: Data-Mining Wikipedia for Fun and Profit
#74Earlier quoted context omitted.
>IANAL but since the pages are published under Creative Commons Attribution-ShareAlike, if someone wishes to collect the text on the basis of the HTML version then there's not much you can do about it. They said please don't, not don't do it or they'll sue you. But content license and site terms of use are different things. From their terms of use you aren’t allowed to > [Disrupt] the services by placing an undue bur…
Yes, but they aren't going to care for just 2400 pages. As a general rule, make your scraper non-paralell, and put a user-agent that has contact details in the event of an issue, and you're probably all good. After all wikipedia is meant to be used. Don't be unduly disruptive, don't scrape 20 million pages, but scraping a couple thousand is totally acceptable. Source: used to work for wikimedia, albeit not in the sre…
Re: Data-Mining Wikipedia for Fun and Profit
#75>The graph was interesting but this wasn’t the primary objective of this exercise. I wanted to write “He is the n-times great-father of his current successor Queen Elizabeth.” on King Alfred’s Wikipedia page. Wouldn’t that contravene Wikipedia’s rules on original research?
But yes, citing your own blog isn't a valid source, and neither is citing wikipedia - https://en.wikipedia.org/wiki/Wikipedia:Verifiability#Self-p...
Re: Data-Mining Wikipedia for Fun and Profit
#76>The graph was interesting but this wasn’t the primary objective of this exercise. I wanted to write “He is the n-times great-father of his current successor Queen Elizabeth.” on King Alfred’s Wikipedia page. Wouldn’t that contravene Wikipedia’s rules on original research?
The edit got reverted because there was no clear criteria for mentioning Queen Elizabeth III but not the other descendants. If he made an info graphic or info box with a clear inclusion criteria and stuck it in the Alfred article it would probably stick.
Re: Data-Mining Wikipedia for Fun and Profit
#77Earlier quoted context omitted.
Yes, but they aren't going to care for just 2400 pages. As a general rule, make your scraper non-paralell, and put a user-agent that has contact details in the event of an issue, and you're probably all good. After all wikipedia is meant to be used. Don't be unduly disruptive, don't scrape 20 million pages, but scraping a couple thousand is totally acceptable. Source: used to work for wikimedia, albeit not in the sre…
I don’t think the op was talking specifically to the content author, but to all the people who read the article and get the idea to scrape Wikipedia.
(Before anyone takes this out of context - no im not saying its ok to be intentionally disruptive, or do things without exercising any care at all. Also always set a unique descriptive user-agent with an email address if you're doing anything automated on wikipedia).
Re: Data-Mining Wikipedia for Fun and Profit
#78Where's the profit?
For three minutes, something I wrote was cited on Wikipedia.
The person who did the revert seems like a bundle of joy, though. Congrats on your efforts.
Re: Data-Mining Wikipedia for Fun and Profit
#79For this particular problem I wonder if wikidata would be better instead of scraping the HTML.
Definitely. There's even a public query service ( https://query.wikidata.org/ ) which can do a lot of this (though SQL is not good with searching for chains).
The SQL endpoint is at https://quarry.wmflabs.org/ however it doesn't have the actual data so much as metadata (mostly) so its not super useful.
Re: Data-Mining Wikipedia for Fun and Profit
#80Earlier quoted context omitted.
Parsoid[1] is what you'd want for that, most likely. It's the new wikitext parser that MediaWiki is gradually switching over to, but it has the virtue of being usable entirely outside of MediaWiki if you need to. [1]: https://www.mediawiki.org/wiki/Parsoid
Yes, but it implements lua by calling into the old stack, which doesn't really solve OPs problem.