0

I would like to extract the information from this website: https://poit.bolagsverket.se/poit-app/kungorelse/K397881-22

The part I am looking for is this:

enter image description here

But the problem is that this website requires javascript.

I am not sure how to go about extracting this information and it seems that this info is not part of the source code.

What I would like to do is to put the information into a list like this:

[{ orgnr:559387-6435, företagsnamn:Aktiebolaget Grundstenen 300298, säte:Stockholm, etc. }, { orgnr:4389483439, företagsnamn:Some other name, säte:some city, etc. }]

I get this link and a several other links from a list I create in an earlier step

[link1:https....,link2:https...,link3:https...]

I have tried to use selenium but I cannot get past the step of opening Firefox. I am running python 3.10 on Windows 11.

Thank you all in advance!

2 Answers 2

1

The data comes from a xhr/fetch. You can find it here: https://poit.bolagsverket.se/poit/rest/HamtaKungorelse?kungorelseid=K397881/22

Sign up to request clarification or add additional context in comments.

2 Comments

Wow, could you please walk me through the steps to find that information? Thank you so much!!
If you load the page with the network tab open and search for the text you're looking for, it will show you which response contains it.
0

I do not know Selenium, but alternatively you could try the requests-html module for python to render the javascript. From the requests-html documentation:

r = session.get('http://python-requests.org')
r.html.render()

After that, BeautifulSoup can help you parse the contents.

1 Comment

I tried that, not the BeautifulSoup part though. The problem is that parsing the HTML, likewise getting the source manually through browser, doesn't show that information or content. That is my main problem here..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.