I'm trying to parse a simple HTML page with pup. This is a command-line HTML parser and it accepts general HTML selectors.
I want to select:
'div.aclass text{}' #(would be SampleA)
and I also want to select:
'div.bclass text{}' #(would be SampleB)
and I want to concatenate them and insert some custom text to get:
SampleA;MYEXTRASTRING;SampleB
I want to avoid calling pup more than once as it is slow.
I can select multiple tags:
'div.aclass text{}, div.bclass text{}'
but this will result:
SampleA
SampleB
Is there any better choice than pup for this purpose?
(Note: Python is NOT an option as it's very slow for my needs.)