Python Forum

Full Version: BeautifulSoup help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!
1# I have problem with BeautifulSoup. I have this site thats only text (there's no body or anything) and its coded like this:
{
"python": {
"python": {
"python": {
"python": |number|;

"python": "python",

"python": "python",

"python": "python",

"python": "python"
},
And all site is text like this. So i got out it to python with request and Beautiful Soup but when i print it it stays like its on site and idk how to get out that number.



2# And how do i make it update every 500ms so it can ran with another code. I though about loop but when there's loop in program it wont run another loop that needs that data. What i need is loop that does it self every X seconds where x is number that updates in unknown time.
It looks you are dealing with JSON. Have a look at the docs or find a tutorial how to work with JSON (e.g. documentation for json module), incl. with requests (see JSON Response Content)