Quote:
Originally Posted by lordvetinari2
I am trying to create a new recipe for Publico PT, because the bundled one does not work any more. I tried fixing it, but there was a regexp there that I do not understand.
|
It might be easier to just figure out this regex.
Quote:
So I tried creating my own from scratch, and it mostly works, but I have a few problems.
The main problem is that certain parts of the website work differently, for some reason. Now, my recipe is checking for certain tags to remove unnecessary items (menus, icons, etc), and not every section uses the same tags. For instance, "http://economia.publico.pt/Noticia/g...e-2013_1441633" has the main article inside a div id="content", but the article "http://desporto.publico.pt/noticia.aspx?id=1441651" has a the main article inside a div class="containerMain". As my recipe stands now, when it does not find the tag defined under "keep_only_tags", it just returns an empty page. Is there any way to say, "check for this tag and if it's not there, check for the other one instead"?
|
Yes - sort of, but why not just keep both tags instead of making it conditional? It should work just as well, unless both tags are used on the same page.