Assignment 71
Assignment 71
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)