-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GroupBundNaturschutzBridge] Add bridge and adjust XPathAbstract #2445
[GroupBundNaturschutzBridge] Add bridge and adjust XPathAbstract #2445
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
GroupBundNaturschutzBridge
because 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.php
in 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
DOMText
node with the XPathtext()
function, so I had to adjust the check when getting the value to includeDOMText
objects.