mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-01 22:35:21 +03:00
[GithubSearchBridge] Add programming language (#3074)
This commit is contained in:
parent
c4d95558af
commit
7c96334e3b
1 changed files with 9 additions and 1 deletions
|
@ -49,7 +49,7 @@ class GithubSearchBridge extends BridgeAbstract
|
||||||
$tags = $element->find('a.topic-tag');
|
$tags = $element->find('a.topic-tag');
|
||||||
$tags_array = [];
|
$tags_array = [];
|
||||||
if (count($tags) != 0) {
|
if (count($tags) != 0) {
|
||||||
$content = $content . 'Tags : ';
|
$content = $content . 'Tags: ';
|
||||||
foreach ($tags as $tag_element) {
|
foreach ($tags as $tag_element) {
|
||||||
$tag_link = 'https://github.com' . $tag_element->href;
|
$tag_link = 'https://github.com' . $tag_element->href;
|
||||||
$tag_name = trim($tag_element->innertext);
|
$tag_name = trim($tag_element->innertext);
|
||||||
|
@ -58,6 +58,14 @@ class GithubSearchBridge extends BridgeAbstract
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Programming language
|
||||||
|
if (count($element->find('span[itemprop=programmingLanguage]')) != 0) {
|
||||||
|
$language = $element->find('span[itemprop=programmingLanguage]', 0)->innertext;
|
||||||
|
|
||||||
|
$content = $content . '<br />';
|
||||||
|
$content = $content . 'Language: ' . $language;
|
||||||
|
}
|
||||||
|
|
||||||
$item['categories'] = $tags_array;
|
$item['categories'] = $tags_array;
|
||||||
$item['content'] = $content;
|
$item['content'] = $content;
|
||||||
$date = $element->find('relative-time', 0)->datetime;
|
$date = $element->find('relative-time', 0)->datetime;
|
||||||
|
|
Loading…
Add table
Reference in a new issue