architecture – Is it a good idea to connect the Chrome extension to the Python server?

I know that Chrome extensions They are made of Javascript(I'm using React at present).

However, I'm thinking of scraping the texts of the current URL with Spicy python module. Whenever you change the URL, you should scrape the texts and display them in the Chrome extension application.

I must develop A server with Piton and make requests and respond with the Chrome extension? Would that be better than running the Transcription of Python code to Javascript directly on the Chrome extension in terms of speed and maintainability?