• Kursy
  • Kompilator kodu
  • Dyskusja
  • Cennik
  • Zespoły
Menu
0

Is there a way or a module to convert html code to json in html? (python)

I want to get data from a html code as a string converted to json (dict) Any way to do it? In python

htmlpythontodict
9th Jan 2020, 8:58 AM
Sousou
Sousou - avatar
2 odpowiedzi
+ 2
Try BeautifulSoup http://www.compjour.org/warmups/govt-text-releases/intro-to-bs4-lxml-parsing-wh-press-briefings/
9th Jan 2020, 12:00 PM
Sarthak
Sarthak - avatar
+ 1
I think the standard json module can do this with json.dumps() but I haven't tried it. Check: https://stackoverflow.com/questions/43469412/convert-html-source-code-to-json-object/43469641#43469641
9th Jan 2020, 11:56 AM
Tibor Santa
Tibor Santa - avatar

Często masz takie pytania?

Ucz się bardziej efektywnie, za darmo:

  • Wprowadzenie do Pythona

    7.1M uczących się

  • Wprowadzenie do Java

    4.7M uczących się

  • Wprowadzenie do C

    1.5M uczących się

  • Wprowadzenie do HTML

    7.5M uczących się

Zobacz wszystkie kursy
Popularne dzisiaj
Is this realistic enough?
2 Votes
"Which is harder to master — Machine Learning or Cybersecurity? And why?"
1 Votes
Need friends
0 Votes
"What’s the best way to combine creativity and coding? Can storytelling improve web apps?"
1 Votes
I am a beginner, please teach me how to use Python
0 Votes
MASS N NUMBER OF OBJECT DELETION FROM A CLASS
0 Votes
Web Development
0 Votes
Cybersecurity techies
3 Votes
Please complete this code.
0 Votes
Can u learn multiple language at the same time, without misplacing the formats of each with the other
0 Votes