[GroupBundNaturschutzBridge] Add bridge and adjust XPathAbstract#2445
[GroupBundNaturschutzBridge] Add bridge and adjust XPathAbstract#2445Bockiii merged 3 commits intoRSS-Bridge:masterfrom dweipert-3138720606:GroupBundNaturschutzBridge
Conversation
|
@DRogueRonin Your changes to |
|
You could add my |
|
I have merged your changes to |
|
I fixed the code according to the failed phpunit tests, I forgot to check that locally. |
|
@DRogueRonin This PR still good? |
|
I'm not the biggest fan of xpathabstract bridges (as its often just "here be prefilled values") but in this case I think it's valuable. Expanding the posts would be even cooler, but I think that would add a lot of complexity (and tbh, I dont think this bridge will have many users). So thanks, will merge. |
This adds a bridge for the subdomains of https://bund-naturschutz.de.
The local groups with corresponding subdomains are listed here: https://www.bund-naturschutz.de/ueber-uns/organisation/kreisgruppen-ortsgruppen
I named the bridge
GroupBundNaturschutzBridgebecause it doesn't actually get the news from bund-naturschutz.de, but from its groups. Where each group has its own subdomain.All groups are working, except for the ones I commented out, mainly because they didn't use the subdomain pages and therefore had a different HTML layout.
I'm not sure about the exact name, description and parameter name regarding what should be written in english or german.
I guess the parameter name could be Kreisgruppe? Or should it stay Group?
@Niehztog I had to adjust the
XPathAbstract.phpin the process of creating this bridge.Some images were named
$image.JPG, so I added the case-insensitive modifier to the regex.Other images had
%encoded paths and didn't match the regex correctly, that's why I added the\%there as well.I'm capturing a
DOMTextnode with the XPathtext()function, so I had to adjust the check when getting the value to includeDOMTextobjects.