[WikipediaBridge] Add Russian Version (#2529)

This commit is contained in:
Yaman Qalieh 2022-03-24 19:02:38 -04:00 committed by GitHub
parent 50bab079e1
commit 2ade568a84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

View File

@ -17,6 +17,7 @@ class WikipediaBridge extends BridgeAbstract {
'exampleValue' => 'English',
'values' => array(
'English' => 'en',
'Русский' => 'ru',
'Dutch' => 'nl',
'Esperanto' => 'eo',
'French' => 'fr',
@ -267,6 +268,24 @@ class WikipediaBridge extends BridgeAbstract {
}
}
/**
* Implementation for ru.wikipedia.org
*/
private function getContentsRu($html, $subject, $fullArticle){
switch($subject) {
case WIKIPEDIA_SUBJECT_TFA:
$element = $html->find('div[id=main-tfa]', 0);
$this->addTodaysFeaturedArticleGeneric($element, $fullArticle, -1);
break;
case WIKIPEDIA_SUBJECT_DYK:
$element = $html->find('div[id=main-dyk]', 0);
$this->addDidYouKnowGeneric($element, $fullArticle);
break;
default:
break;
}
}
/**
* Implementation for eo.wikipedia.org
*/