Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the ways in which Jupyter renders web pages?

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "what are the ways of Jupyter to render web pages". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

There are three ways to render:

Render text render variable proxy page 1. Render text

Put the htm page content after%% html, as shown in the following example:

Html

Chenqionghe

Chenqionghe

Yeah buddy! Light weight bay!

Geting muscle is not easy

Second, rendering variables

For example, we often crawl web pages through requests, which can directly render the crawled content. For example, we can grab web pages through request and render res.text directly. The code is as follows:

Import requests

From IPython.display import HTML

Res=requests.get ('http://jd.com')

HTML (res.text)

Third, the agent page

Existing pages that want to be displayed through jupyter can be rendered by the IFrame method. The src can be a local html or a web address.

From IPython.display import IFrame

IFrame (src=' https://www.qq.com/', width=1000, height=600)

This is the end of the content of "how to render a web page with Jupyter". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 291

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report