Skip to content

Commit

Permalink
[FirefoxAddonsBridge] Fix add-on download links (RSS-Bridge#2338)
Browse files Browse the repository at this point in the history
  • Loading branch information
VerifiedJoseph authored Jan 15, 2022
1 parent f259fa7 commit c65feff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bridges/FirefoxAddonsBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ public function collectData() {

$compatibility = $li->find('div.AddonVersionCard-compatibility', 0)->plaintext;
$license = $li->find('p.AddonVersionCard-license', 0)->innertext;
$downloadlink = $li->find('a.InstallButtonWrapper-download-link', 0)->href;

if ($li->find('a.InstallButtonWrapper-download-link', 0)) {
$downloadlink = $li->find('a.InstallButtonWrapper-download-link', 0)->href;

} elseif ($li->find('a.Button.Button--action.AMInstallButton-button.Button--puffy', 0)) {
$downloadlink = $li->find('a.Button.Button--action.AMInstallButton-button.Button--puffy', 0)->href;
}

$releaseNotes = $this->removeOutgoinglink($li->find('div.AddonVersionCard-releaseNotes', 0));

if (preg_match($this->xpiFileRegex, $downloadlink, $match)) {
Expand Down

0 comments on commit c65feff

Please sign in to comment.