0% found this document useful (0 votes)
3 views5 pages

Python for Web Programming Basics

Web programming involves creating websites and applications using languages like HTML, CSS, JavaScript, and Python. Python plays a crucial role in back-end development and web scraping, utilizing libraries such as requests and BeautifulSoup for data retrieval and manipulation. The document also provides examples of simple web client programs in Python that demonstrate how to interact with websites.

Uploaded by

yashjoharali
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

Python for Web Programming Basics

Web programming involves creating websites and applications using languages like HTML, CSS, JavaScript, and Python. Python plays a crucial role in back-end development and web scraping, utilizing libraries such as requests and BeautifulSoup for data retrieval and manipulation. The document also provides examples of simple web client programs in Python that demonstrate how to interact with websites.

Uploaded by

yashjoharali
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

WEB

PROGRAMMING

INTRODUCTION

Web programming is the process of creating websites and web applications that
run on the internet using programming [Link] includes designing pages,
adding functions, and connecting them to data using languages like HTML, CSS,
JavaScript, and Python.
💡 Example:When you open a shopping website —HTML shows the
products,CSS makes it beautiful,JavaScript adds actions (like “Add to
Cart”),and Python saves your order in the database.

Role of Python in Web Programming

Python helps build the back-end of websites — it handles data, servers, and
logic using frameworks like Flask and Django.
WEB SURFING WITH
PYTHON

Web surfing with Python means using Python to open websites and read
their data [Link] Python, for web surfing (or web scraping), there
are two main libraries

1. requests → used to fetch the web page (like opening a website in a


browser)

2. BeautifulSoup → used to read and understand the page data, and extract
text from inside the HTML tags.
WEB SURFING PROGRAM

import requests
from bs4 import BeautifulSoup

url = “[Link]
page = [Link](url)
soup = BeautifulSoup([Link], "[Link]")

print("Website Title:", [Link])


CREATING SIMPLE WEB CLIENTS (IN
PYTHON)

A web client is a small Python program that talks to a website (server) and
gets information from [Link] works like a mini browser made with Python.

Creating simple client program

import requests
url = [Link]
response = [Link](url)
print([Link])
CONCLUSIO
N

Python makes web surfing and web client creation easy and [Link]
libraries like requests and BeautifulSoup, we can access websites, read data, and
automate online tasks quickly and simply.

THANK YOU
CLASSMATES

MD YASH JOHAR
ALI

You might also like