Skip to main content

Featured

Tic Tac Toe

Tic Tac Toe Tic Tac Toe is a simple, two-player strategy game played on a 3x3 grid. Players take turns marking a square with either an "X" or an "O", with the goal of being the first to align three of their marks in a row, column, or diagonal.  I have made a simple Tic Tac Toe game using html, css, javascript.  The game doesnot have much features. The game is created to be played by two peoples. It is just a simple game. The code of this game you get in my github page   Link of this game code is below: Tic Tac Toe Game Code /

Web Scraping using python

We can do web scraping using python. In this we are going to use bs4 and request. So before running this code  you need to install the this requirement using python pip. If you have installed this requirement you can use this code to do web scraping. 

This program will ask you the url then it will save the the html content in "temp.html".

Here's the code:

import requests
from bs4 import BeautifulSoup

print("\t ______Html webscraper______ \n")
url = input("Type the url: ")

conten = requests.get(url)

print("Getting Content.....")
htmlContent = conten.content

# print(htmlContent)

soup = BeautifulSoup(htmlContent, "html.parser")
print("Saving the content in temp.html")

with open("temp.html" , "w") as f:
    f.write(soup.prettify())

# print(soup.prettify())

Comments

Popular Posts