diff options
author | Andrew Dolgov <[email protected]> | 2023-08-03 07:23:58 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2023-08-03 07:23:58 +0300 |
commit | 83bb62633d0f4c129eb5ab69a45365ab5fda3d46 (patch) | |
tree | 0b491a1238c32fe23d3f272ba09d60fc80d11f45 /init.php | |
parent | 2de739b757ffb454134f9c2c53074a28a390ff70 (diff) |
extract article author badly
Diffstat (limited to 'init.php')
-rw-r--r-- | init.php | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -278,6 +278,12 @@ class Af_Lemmy extends Plugin { array_push($categories, $link->textContent); } + $submitted_by = $xpath->query('//a[contains(@href, "/u/")]')->item(0); + + if ($submitted_by) { + $article["author"] = $submitted_by->textContent; + } + array_push($article["tags"], ...FeedItem_Common::normalize_categories($categories)); $found = $this->inline_stuff($article, $doc, $xpath, $origin_domain); |