Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

209
Views
¿Hay alguna manera de saltar de python y JS?

Estoy tratando de crear una extensión de Chrome que está hecha en JS, sin embargo, construí la parte principal del código en python porque es el idioma que conozco, y no estoy seguro de si lo que estoy tratando de hacer es incluso posible en JS. ¿Hay alguna manera de tomar una variable que obtengo de JS, usarla para ejecutar una función de python y luego continuar con el código JS?

 chrome.browserAction.onClicked.addListener(function(activeTab){ chrome.tabs.getSelected(null, function(tab) { var tabId = tab.id; tabUrl = tab.url; id = tabUrl.split("=")[1]; //call python func here }); var newURL = "frame.html"; chrome.tabs.create({ url: newURL}); });

 from youtube_transcript_api import YouTubeTranscriptApi import webbrowser def func(id): html_file = open('frame.html','w') list = YouTubeTranscriptApi.get_transcript(id) webbrowser.get('C:/Program Files/Google/Chrome/Application/chrome.exe %s') data = '<html>\n<head>\n<link rel="stylesheet" href="styles.css">\n</head>\n<body>\n<p>\n' for i in list: data += i.get('text') + ' ' data += '</p>\n</body>\n</html>' html_file.write(data) html_file.close() #func(id from java)
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!