How do you scrape text off a website and display it in UMG?

Hi, I was thinking of making a fun program for me and my friends where UE5 would retrieve text from a website that generates stories with AI and then have it display in a text widget and have cool effects in the background and stuff. Not really sure how to go about this.

2 Likes

The easiest way to do it is probably Building a webpage scraper with python and use the Unreal python api to update the widget

2 Likes

Alright so after a few days of tinkering around and messing with Python, I made a script that scrapes the text off the AI website and stores it in a .txt file. Then the widget text box can be updated using Rama’s Victory Plugin to read from the txt document.
I don’t know how to run the script in runtime though. Also I’m guessing it’s just better to set the variable for the text from Python itself instead of storing it as a text document, but I don’t know how to do that.

1 Like

I loved this course, it’s mainly about the editor scripting utilities but I learnt a lot from it.
It teaches you how to interact with your code using blueprints, C++ and Python (you make the same things with each language).
It’s hard to find info about this argument, if you don’t want to spend money you can find almost everything in the Unreal Python API Documentation

1 Like