We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83c36a8 commit f270cd3Copy full SHA for f270cd3
bridges/TldrTechBridge.php
@@ -57,6 +57,9 @@ public function collectData()
57
continue;
58
}
59
$itemUrl = Url::fromString(self::URI . ltrim($child->href, '/'));
60
+ if ($itemUrl == $locationUrl) {
61
+ continue;
62
+ }
63
$this->extractItem($itemUrl);
64
if (count($this->items) >= $limit) {
65
break;
@@ -125,6 +128,11 @@ private function extractContent($url)
125
128
126
129
127
130
131
+ foreach ($content->find('section') as $section) {
132
+ if (count($section->children()) == 0) {
133
+ $content->removeChild($section);
134
135
136
$title = $content->find('h2', 0);
137
return [$content->innertext, $title->plaintext];
138
0 commit comments