function analyse() { parent::analyse(); if (substr($this->url, 0, 30) == "http://www.worldcat.org/title/" && preg_match("@/oclc/([0-9]*)@", $this->url, $matches)) { $this->switchTo = ['document' => ['class' => 'Book', 'params' => ['OCLC' => $matches[1]], 'method' => 'queryWorldCatFromOCLC'], 'template' => 'book']; } }
/** * Analyses the page and extracts metadata */ function analyse() { parent::analyse(); $this->skipAuthor = true; $this->extractYYYYMMDDDateFromURL(); $this->site = "[[Anime News Network]]"; }
/** * Analyses the page and extracts metadata */ function analyse() { parent::analyse(); // Hardcoded known info $this->site = "Footoféminin"; $this->parseDate(); }
/** * Analyses the page and extracts metadata */ function analyse() { parent::analyse(); $this->author = self::between('rel="author">', '</a>'); $this->extractYYYYMMDDDateFromURL(); $this->site = "[[AnimeLand]]"; }
/** * Analyses the page and extracts metadata */ function analyse() { parent::analyse(); $this->site = '[[Los Angeles Times]]'; $this->antiAdBlocker = true; $this->author = self::between('<span itemprop="author">', '</span'); }
/** * Analyses the page and extracts metadata */ function analyse() { parent::analyse(); $this->site = "[[Le Huffington Post]]"; $this->author = self::between('<a class="author-card__details__name">', '</a>'); $this->extractYYYYMMDDDateFromURL(); }
function analyse() { parent::analyse(); $this->publisher = 'Taylor & Francis'; //DOI $this->doi = self::between('meta name="dc.Identifier" scheme="doi" content="', '"'); //Gets the right dc.Identifier (coden scheme) //Expected format: <Issue name>, Vol. <Issue volume>, No. <Issue number>, <Issue date>, pp. <article pages> //e.g. Annals of Science, Vol. 68, No. 3, July 2011, pp. 325–350 $identifier = self::between('meta name="dc.Identifier" scheme="coden" content="', '"'); $identifier_data = explode(', ', $identifier); $pos = strpos($identifier, ", Vol. "); $this->journal = substr($identifier, 0, $pos); $this->volume = self::grab($identifier, "Vol. ", ","); $this->issue = self::grab($identifier, "No. ", ","); $date = explode(' ', $identifier_data[3]); $this->yyyy = array_pop($date); $pos = strpos($identifier, "pp. "); $this->pages = substr($identifier, $pos + 4); //Author //TODO: handle several authors $author = trim(self::getMetaTag($this->meta_tags, 'dc.Creator')); $names = explode(' ', $author); if (count($names) == 2) { $this->author = "{$names['1']}, {$names['0']}"; } else { $this->author = $author; } }
/** * Analyses the page and extracts metadata */ function analyse() { parent::analyse(); $author = self::between('<span itemprop="author">', '</span>'); $this->author = name_case($author); $this->extractDate(); $this->site = "[[L'Avenir (Belgique)|L'Avenir]]"; }
function analyse() { parent::analyse(); //Fixing citation_doi metatag bug //<meta name="citation_doi" content=" 10.7202/012719ar" /> $doi = str_replace(' ', '', $this->meta_tags['citation_doi']); $this->meta_tags['citation_doi'] = trim($doi); }
/** * Analyses the page and extracts metadata */ function analyse() { parent::analyse(); $authorElement = self::between('<div class="byline">', '</div>'); $this->author = self::grab($authorElement, '">', '</a>'); $this->extractYYYYMMDDDateFromURL(); $this->site = "[[Crunchyroll]]"; }
/** * Analyses the page and extracts metadata */ function analyse() { parent::analyse(); $this->skipAuthor = true; $this->title = $this->getTitle(); $this->yyyy = $this->getYear(); $this->skipMD = true; $this->site = "Formula 1"; }
function analyse() { parent::analyse(); //Hardcoded known info $this->site = "Les Chroniques Automatiques"; $this->author = "Dat’"; //Gets date $this->dateFromDateParse(trim(self::between('This entry was posted on', 'and is filed under'))); }
function analyse() { parent::analyse(); $this->site = "[[Le Soir]]"; if ($this->isArchive()) { $this->analyseForArchive(); } else { $this->analyseForMainSite(); } }
function analyse() { parent::analyse(); //Hardcoded known info $this->site = "[[Le Monde]]"; $this->issn = '1950-6244'; //Gets date // e.g. http://www.lemonde.fr/ameriques/article/2013/05/25/le-bresil-annule-la-dette-de-douze-pays-africains_3417518_3222.html $pos = strpos($this->url, "/article/"); $this->yyyy = substr($this->url, $pos + 9, 4); $this->mm = substr($this->url, $pos + 14, 2); $this->dd = substr($this->url, $pos + 17, 2); $this->author = $this->getAuthor(); }
/** * Analyses the page and extracts metadata */ function analyse() { parent::analyse(); // Hardcoded known info $this->site = "[[Le Parisien]]"; // From metadata $this->dateFromDateParse($this->meta_tags['article:published_time']); $author = $this->meta_tags['creator']; if ($author === "Le Parisien") { $this->skipAuthor = true; } else { $this->author = $author; } }
function analyse() { parent::analyse(); //Hardcoded known info $this->site = "[[Rue89]]"; $this->issn = '1958-5837'; //Gets date list($this->yyyy, $this->mm, $this->dd) = $this->extractDateFromURL('/'); //Gets author //TODO: ensure no article has more than one author $pos1 = strpos($this->data, '<div class="authors">'); $pos1 = strpos($this->data, 'class="author">', $pos1) + 15; $pos2 = strpos($this->data, '/a>', $pos1) - 1; $this->author = substr($this->data, $pos1, $pos2 - $pos1); }
function analyse() { //La Libre uses ISO-8859-1 and not UTF-8 $this->data = iconv('iso-8859-1', 'utf-8', $this->data); //Calls parent analyzer parent::analyse(); //Hardcoded known info $this->site = "[[La Libre Belgique]]"; $this->skipYMD = true; //Gets date $date = trim(self::between('Mis en ligne le ', '</p>')); $yyyy = substr($date, 6, 4); $mm = substr($date, 3, 2); $dd = substr($date, 0, 2); $this->unixtime = mktime(12, 0, 0, $mm, $dd, $yyyy); $this->date = strftime(LONG_DATE_FORMAT, $this->unixtime); //Gets authors $authors = trim(self::between('<p id="writer">', '</p>')); if (strpos($authors, 'daction ') > 0) { //"rédaction en ligne", "Rédaction web","Rédaction en ligne (avec afp)", etc. //(they're not coherent about case). $this->skipAuthor = true; } else { $authors = preg_split('/( et |, )/', $authors); $start = true; foreach ($authors as $author) { //Fixes some authors switch ($author) { case 'G. Dt': $author = 'Guy Duplat'; break; case 'afp': $author = 'AFP'; break; } if ($start) { $this->author = $author; $start = false; } else { $this->coauthors[] = $author; } } } //Gets title if (!($this->title = $this->meta_tags['og:title'])) { $this->title = self::between("<title>Lalibre.be - ", "</title>"); } }
function analyse() { parent::analyse(); //Hardcoded known info $this->site = "[[The New York Times]]"; //Gets date from pdate metatag $this->yyyy = substr($this->meta_tags['pdate'], 0, 4); $this->mm = substr($this->meta_tags['pdate'], 4, 2); $this->dd = ltrim(substr($this->meta_tags['pdate'], 6, 2), '0'); $this->unixtime = mktime(0, 0, 0, $mm, $dd, $yyyy); //Gets author //TODO: Handle the several authors case require 'helpers/namecase.php'; $author = substr($this->meta_tags['byl'], 3); $this->author = name_case($author); }
function analyse() { parent::analyse(); //From HTML code $this->author = trim(self::between('<div class="author">', '</div>')); $this->journal = trim(self::between('<h2>', "\n")); $this->issn = self::between('<div class="issn">ISSN: ', '</div>'); $this->url = self::between('<div class="stable">Article Stable URL: ', '</div>'); //Publisher $pub = self::between('<div class="pubString">Published by: ', '</div>'); $this->publisher = $pub ? self::grab($pub, '>', '</a>') : 'JSTOR'; //Issue information $srcInfo = trim(self::between('<!-- Formatting requires these tags be mashed together -->', '</div>')); $this->volume = self::grab($srcInfo, "Vol. ", ","); $this->issue = self::grab($srcInfo, "No. ", " "); $this->yyyy = self::grab($srcInfo, '(', ')'); $pos = strpos($srcInfo, "pp. "); $this->pages = substr($srcInfo, $pos + 4); }
function analyse() { parent::analyse(); //Hardcoded known info $this->site = "[[Le Figaro]]"; $this->skipYMD = true; $this->issn = '0182-5852'; //Gets date //e.g. http://www.lefigaro.fr/actualite-france/2013/05/24/01016-20130524ARTFIG00438-frigide-barjot-ne-pense-pas-manifester-dimanche.php $pos = strpos($this->url, "/20") + 1; $yyyy = substr($this->url, $pos, 4); $mm = substr($this->url, $pos + 5, 2); $dd = substr($this->url, $pos + 8, 2); $this->unixtime = mktime(0, 0, 0, $mm, $dd, $yyyy); $this->date = strftime(LONG_DATE_FORMAT, $this->unixtime); //Gets author //e.g. <span itemprop="author" class="auteur txt12_120">Stéphanie Le Bars</span> //e.g. <a itemprop="name" href="#auteur" class="fig-anchor fig-picto-journaliste-haut">Stéphane Kovacs</a> //TODO: ensure no article has more than one author $author = self::between('itemprop="name"', '</'); $pos = strpos($author, '">') + 2; $this->author = substr($author, $pos); }
function analyse() { parent::analyse(); $authors = explode("; ", $this->meta_tags['citation_author']); $this->coauthors = $authors; }
function analyse() { parent::analyse(); $this->publisher = 'Persée'; }