Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

2. Write a program to download all the videos from youtube.

com for django from


the hyperlink given below
https://www.youtube.com/playlist?list=PLxxA5z-8B2xk4szCgFmgonNcCboyNneMD

from pytube import YouTube###YouTube('https://www.youtube.com/watch?


v=dxZOyl33700&list=PLWPirh4EWFpEFSYTbKaST6hSlgIFCJjU3&index=15').streams.first().do
wnload("F:/Usman")

from 3 to 5

3. Create a csv file with name and hyperlink after fetching it from the web page
http://bioguide.congress.gov/biosearch/biosearch1.asp
download the page source and save in html file and then perform scrapping
4. from the question above, fetch only the hyperlinks
5. from the question above, fetch - names, years, positions, parties, states,
congress,
fullLink

import requests
from bs4 import BeautifulSoup

r=requests.get("http://bioguide.congress.gov/biosearch/biosearch1.asp")

c=r.content
soup=BeautifulSoup(c,"html.parser")
for link in soup.find_all('name, years'):
print(link.get('href'))

print(c)

You might also like