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

Feature request: More dynamic input options to data source #69

Open janner opened 6 months ago

janner commented 6 months ago

Love the plugin! Thank you!

I have a use case where I use the plugin to scrape data from a bowling alley score website. Would it be possible to get more GDI Texts as dynamic inputs added to the source?

I'm not sure if this is a bug. I'm trying to use dynamic text input in the "RegEx" field, but OBS crashes. That would be very helpful to have. Also adding a dynamic input to the source URL would be very helpful for scraping purposes.

Regex also only returns the first match even when there are more. I'm not sure if this my fault, but setting RegEx flag "g" does not help.

I have hard time understanding the different Regex options as they are not behaving as I would expect them to. If you could direct me to where I could read more, I would appreciate that.

royshil commented 6 months ago

yea adding more inputs shouldn't be hard to add. i will add it for v0.2.6

the input is available in the URL just add {{input}} in the URL, and possibly use urlencode(..) as well to avoid URL formatting issues

for the regex parsing i'm simply yusing C++ STD regex : https://en.cppreference.com/w/cpp/regex

royshil commented 6 months ago

i started working on implementing the feature it shuold be up soon for testing