occ-ai / obs-urlsource

OBS plugin to fetch data from a URL or file, connect to an API or AI service, parse responses and display text, image or audio on scene
https://obsproject.com/forum/resources/url-api-source-fetch-live-data-and-display-it-on-screen.1756/
GNU General Public License v2.0
130 stars 18 forks source link

Output entries in wrong order #94

Open raphj92 opened 2 months ago

raphj92 commented 2 months ago

I'm trying to grab a list of participant from a web page containing multiple tables. Using a CSS Selector of "tr" brings each row from each table, but not in the correct order.

First table is gathered like this:

{{output 0}} ==> data from table1 row 7 {{output 1}} ==> data from table1 row 8 {{output 2}} ==> data from table1 row 1 {{output 3}} ==> data from table1 row 2 {{output 4}} ==> data from table1 row 3 {{output 5}} ==> data from table1 row 4 {{output 6}} ==> data from table1 row 5 {{output 7}} ==> data from table1 row 6

And the same is gathered for the 2nd table, but sometimes starting with a different shift in rows.

On a different web page containing only one table, the problem does not occur.

royshil commented 1 week ago

not sure i know how to resolve this because the iterator is coming from pugiXML parser in a certain order that i can't control unless there's some sort mechanism that can be applied in the selector?