SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
import requests from bs4 import Beauttfutsoup import csv With open ('th_tegistator.csv', 'W',
newtthes''') as ftles wrtter = csv.Wrtter(tte) wrtter.wrtterow(' 'fname', ' 'name', 'ematl', 'phone',
'party', 'dtstr tct','state', 'assembly'1) house_url = 'https://mW.capttol.tn.gov/house/members/'
house_page = requests.get(house_urt) house_soup = BeauttfutSoup(house_page. content, 'html,
parser') house_table = house_soup.ftnd ('table') house_rows = house_table.find_all ('tr') [1:] for
row in house_rows: columns = row.find_all(' td ' ) fname = columns[0]. text.strip() Iname =
columns[1].text.strip() email = columns[2].find(' a ' ) text.strip() phone = columns[3].text.strip()
party = columns[4].text.strip() district = colunns[5]. text.strip() state = 'Tennessee' assembly =
'House' writer.writerow( [' fname', 'Iname' , 'email', 'phone', 'party', 'district','state', 'assegbly'])
senate_url = 'https://Wm. capitol.tn.gov/senate/members/' senate_page = requests.get(senate_url)
senate_soup = BeauttfulSoup(senate_page.content, 'html. parser')
party = cotumns (4, text. strtp() distrtct = columns[5]. text. strtp() state = 'Tennessee' assembly =
'House' writer.writerowil' 'fname', 'Iname', 'ematt', 'phone', 'party', 'dtstrtet', 'state', 'assembly' J)
senate_urt = 'https://WW, capttol.th. gov/senate/members /' senate_page =
requests.get(senate_urt) senate_soup = BeauttfutSoup(senate_page.content, 'htmleparser')
senate_table = senate_soup.f ind( 'table') senate_rows = senate_table.ftnd_atl('tr' )[1:] for row in
senate_rows: columins = row.find_all('td') fnane = columns[0].text.strip() Iname = columns[1]
text.strip() ematl = columns[2].find(' a ') text. strip() phone = columns[3].text.strip() party =
columns [4] text.strip() district = columns[5].text. strip() state = 'Tennessee assembly = 'Senate'
writer.writerow( [' fname', ''name', 'email', 'phone', 'party', 'district', 'state' , 'assembly''])
Traceback (most recent call last): File "main.py", line 13, in

Contenu connexe

Plus de watchamirpune

In Arabidopsis, you look at three closely linked traits on chromosome.pdf
 In Arabidopsis, you look at three closely linked traits on chromosome.pdf In Arabidopsis, you look at three closely linked traits on chromosome.pdf
In Arabidopsis, you look at three closely linked traits on chromosome.pdfwatchamirpune
 
Imagine that investors expect to receive a compensation of rE=10 for.pdf
 Imagine that investors expect to receive a compensation of rE=10 for.pdf Imagine that investors expect to receive a compensation of rE=10 for.pdf
Imagine that investors expect to receive a compensation of rE=10 for.pdfwatchamirpune
 
Image A is best described as A plant cell during prophase An animal.pdf
 Image A is best described as A plant cell during prophase An animal.pdf Image A is best described as A plant cell during prophase An animal.pdf
Image A is best described as A plant cell during prophase An animal.pdfwatchamirpune
 
In 1930, the U.S. government attempted to help domestic firms that we.pdf
 In 1930, the U.S. government attempted to help domestic firms that we.pdf In 1930, the U.S. government attempted to help domestic firms that we.pdf
In 1930, the U.S. government attempted to help domestic firms that we.pdfwatchamirpune
 
In April 2021, the University Sub Shop had an average check of $7.25 .pdf
 In April 2021, the University Sub Shop had an average check of $7.25 .pdf In April 2021, the University Sub Shop had an average check of $7.25 .pdf
In April 2021, the University Sub Shop had an average check of $7.25 .pdfwatchamirpune
 
In 2003 and 2017 a poll asked Democratic voters about their views on .pdf
 In 2003 and 2017 a poll asked Democratic voters about their views on .pdf In 2003 and 2017 a poll asked Democratic voters about their views on .pdf
In 2003 and 2017 a poll asked Democratic voters about their views on .pdfwatchamirpune
 
In C++, the function is called at program startup. group start root m.pdf
 In C++, the function is called at program startup. group start root m.pdf In C++, the function is called at program startup. group start root m.pdf
In C++, the function is called at program startup. group start root m.pdfwatchamirpune
 
In 199746 of Americans said they did not trust the media when it co.pdf
 In 199746 of Americans said they did not trust the media when it co.pdf In 199746 of Americans said they did not trust the media when it co.pdf
In 199746 of Americans said they did not trust the media when it co.pdfwatchamirpune
 
In Canada the proportion of the population is insolvent is 0.3. You.pdf
 In Canada the proportion of the population is insolvent is 0.3. You.pdf In Canada the proportion of the population is insolvent is 0.3. You.pdf
In Canada the proportion of the population is insolvent is 0.3. You.pdfwatchamirpune
 
In Australia grassland, the summer time has minimum rainfall no rainf.pdf
 In Australia grassland, the summer time has minimum rainfall no rainf.pdf In Australia grassland, the summer time has minimum rainfall no rainf.pdf
In Australia grassland, the summer time has minimum rainfall no rainf.pdfwatchamirpune
 
In an effort to determine the immunoglobulin D (IgD) levels of a cert.pdf
 In an effort to determine the immunoglobulin D (IgD) levels of a cert.pdf In an effort to determine the immunoglobulin D (IgD) levels of a cert.pdf
In an effort to determine the immunoglobulin D (IgD) levels of a cert.pdfwatchamirpune
 
In addition, $2,476 was collected for Sandhill Company in August by t.pdf
 In addition, $2,476 was collected for Sandhill Company in August by t.pdf In addition, $2,476 was collected for Sandhill Company in August by t.pdf
In addition, $2,476 was collected for Sandhill Company in August by t.pdfwatchamirpune
 
In a recent survey conducted, a random sample of adults 18 ye.pdf
 In a recent survey conducted, a random sample of adults 18 ye.pdf In a recent survey conducted, a random sample of adults 18 ye.pdf
In a recent survey conducted, a random sample of adults 18 ye.pdfwatchamirpune
 
III. Simplify the following Boolean functions F, together with the do.pdf
 III. Simplify the following Boolean functions F, together with the do.pdf III. Simplify the following Boolean functions F, together with the do.pdf
III. Simplify the following Boolean functions F, together with the do.pdfwatchamirpune
 
In a population distribution, a score of X=54 corresponds to z=2. And.pdf
 In a population distribution, a score of X=54 corresponds to z=2. And.pdf In a population distribution, a score of X=54 corresponds to z=2. And.pdf
In a population distribution, a score of X=54 corresponds to z=2. And.pdfwatchamirpune
 
In a Poisson distribution, =3.20. (Round your answers to 4 decimal pl.pdf
 In a Poisson distribution, =3.20. (Round your answers to 4 decimal pl.pdf In a Poisson distribution, =3.20. (Round your answers to 4 decimal pl.pdf
In a Poisson distribution, =3.20. (Round your answers to 4 decimal pl.pdfwatchamirpune
 
II. X,Y have joint pdf f(x,y)=cexy,0yx1,Z=X+Y. Find pdf for Z..pdf
 II. X,Y have joint pdf f(x,y)=cexy,0yx1,Z=X+Y. Find pdf for Z..pdf II. X,Y have joint pdf f(x,y)=cexy,0yx1,Z=X+Y. Find pdf for Z..pdf
II. X,Y have joint pdf f(x,y)=cexy,0yx1,Z=X+Y. Find pdf for Z..pdfwatchamirpune
 
In a metapopulation, what purposes do source and sink population play.pdf
 In a metapopulation, what purposes do source and sink population play.pdf In a metapopulation, what purposes do source and sink population play.pdf
In a metapopulation, what purposes do source and sink population play.pdfwatchamirpune
 
In a hypothetical mouse species, brown fur (B) is completely dominant.pdf
 In a hypothetical mouse species, brown fur (B) is completely dominant.pdf In a hypothetical mouse species, brown fur (B) is completely dominant.pdf
In a hypothetical mouse species, brown fur (B) is completely dominant.pdfwatchamirpune
 
In a corpus of N documents, the word the appears in N10 of them. W.pdf
 In a corpus of N documents, the word the appears in N10 of them. W.pdf In a corpus of N documents, the word the appears in N10 of them. W.pdf
In a corpus of N documents, the word the appears in N10 of them. W.pdfwatchamirpune
 

Plus de watchamirpune (20)

In Arabidopsis, you look at three closely linked traits on chromosome.pdf
 In Arabidopsis, you look at three closely linked traits on chromosome.pdf In Arabidopsis, you look at three closely linked traits on chromosome.pdf
In Arabidopsis, you look at three closely linked traits on chromosome.pdf
 
Imagine that investors expect to receive a compensation of rE=10 for.pdf
 Imagine that investors expect to receive a compensation of rE=10 for.pdf Imagine that investors expect to receive a compensation of rE=10 for.pdf
Imagine that investors expect to receive a compensation of rE=10 for.pdf
 
Image A is best described as A plant cell during prophase An animal.pdf
 Image A is best described as A plant cell during prophase An animal.pdf Image A is best described as A plant cell during prophase An animal.pdf
Image A is best described as A plant cell during prophase An animal.pdf
 
In 1930, the U.S. government attempted to help domestic firms that we.pdf
 In 1930, the U.S. government attempted to help domestic firms that we.pdf In 1930, the U.S. government attempted to help domestic firms that we.pdf
In 1930, the U.S. government attempted to help domestic firms that we.pdf
 
In April 2021, the University Sub Shop had an average check of $7.25 .pdf
 In April 2021, the University Sub Shop had an average check of $7.25 .pdf In April 2021, the University Sub Shop had an average check of $7.25 .pdf
In April 2021, the University Sub Shop had an average check of $7.25 .pdf
 
In 2003 and 2017 a poll asked Democratic voters about their views on .pdf
 In 2003 and 2017 a poll asked Democratic voters about their views on .pdf In 2003 and 2017 a poll asked Democratic voters about their views on .pdf
In 2003 and 2017 a poll asked Democratic voters about their views on .pdf
 
In C++, the function is called at program startup. group start root m.pdf
 In C++, the function is called at program startup. group start root m.pdf In C++, the function is called at program startup. group start root m.pdf
In C++, the function is called at program startup. group start root m.pdf
 
In 199746 of Americans said they did not trust the media when it co.pdf
 In 199746 of Americans said they did not trust the media when it co.pdf In 199746 of Americans said they did not trust the media when it co.pdf
In 199746 of Americans said they did not trust the media when it co.pdf
 
In Canada the proportion of the population is insolvent is 0.3. You.pdf
 In Canada the proportion of the population is insolvent is 0.3. You.pdf In Canada the proportion of the population is insolvent is 0.3. You.pdf
In Canada the proportion of the population is insolvent is 0.3. You.pdf
 
In Australia grassland, the summer time has minimum rainfall no rainf.pdf
 In Australia grassland, the summer time has minimum rainfall no rainf.pdf In Australia grassland, the summer time has minimum rainfall no rainf.pdf
In Australia grassland, the summer time has minimum rainfall no rainf.pdf
 
In an effort to determine the immunoglobulin D (IgD) levels of a cert.pdf
 In an effort to determine the immunoglobulin D (IgD) levels of a cert.pdf In an effort to determine the immunoglobulin D (IgD) levels of a cert.pdf
In an effort to determine the immunoglobulin D (IgD) levels of a cert.pdf
 
In addition, $2,476 was collected for Sandhill Company in August by t.pdf
 In addition, $2,476 was collected for Sandhill Company in August by t.pdf In addition, $2,476 was collected for Sandhill Company in August by t.pdf
In addition, $2,476 was collected for Sandhill Company in August by t.pdf
 
In a recent survey conducted, a random sample of adults 18 ye.pdf
 In a recent survey conducted, a random sample of adults 18 ye.pdf In a recent survey conducted, a random sample of adults 18 ye.pdf
In a recent survey conducted, a random sample of adults 18 ye.pdf
 
III. Simplify the following Boolean functions F, together with the do.pdf
 III. Simplify the following Boolean functions F, together with the do.pdf III. Simplify the following Boolean functions F, together with the do.pdf
III. Simplify the following Boolean functions F, together with the do.pdf
 
In a population distribution, a score of X=54 corresponds to z=2. And.pdf
 In a population distribution, a score of X=54 corresponds to z=2. And.pdf In a population distribution, a score of X=54 corresponds to z=2. And.pdf
In a population distribution, a score of X=54 corresponds to z=2. And.pdf
 
In a Poisson distribution, =3.20. (Round your answers to 4 decimal pl.pdf
 In a Poisson distribution, =3.20. (Round your answers to 4 decimal pl.pdf In a Poisson distribution, =3.20. (Round your answers to 4 decimal pl.pdf
In a Poisson distribution, =3.20. (Round your answers to 4 decimal pl.pdf
 
II. X,Y have joint pdf f(x,y)=cexy,0yx1,Z=X+Y. Find pdf for Z..pdf
 II. X,Y have joint pdf f(x,y)=cexy,0yx1,Z=X+Y. Find pdf for Z..pdf II. X,Y have joint pdf f(x,y)=cexy,0yx1,Z=X+Y. Find pdf for Z..pdf
II. X,Y have joint pdf f(x,y)=cexy,0yx1,Z=X+Y. Find pdf for Z..pdf
 
In a metapopulation, what purposes do source and sink population play.pdf
 In a metapopulation, what purposes do source and sink population play.pdf In a metapopulation, what purposes do source and sink population play.pdf
In a metapopulation, what purposes do source and sink population play.pdf
 
In a hypothetical mouse species, brown fur (B) is completely dominant.pdf
 In a hypothetical mouse species, brown fur (B) is completely dominant.pdf In a hypothetical mouse species, brown fur (B) is completely dominant.pdf
In a hypothetical mouse species, brown fur (B) is completely dominant.pdf
 
In a corpus of N documents, the word the appears in N10 of them. W.pdf
 In a corpus of N documents, the word the appears in N10 of them. W.pdf In a corpus of N documents, the word the appears in N10 of them. W.pdf
In a corpus of N documents, the word the appears in N10 of them. W.pdf
 

Dernier

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 

Dernier (20)

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 

import requests from bs4 import Beauttfutsoup import csv With open (.pdf

  • 1. import requests from bs4 import Beauttfutsoup import csv With open ('th_tegistator.csv', 'W', newtthes''') as ftles wrtter = csv.Wrtter(tte) wrtter.wrtterow(' 'fname', ' 'name', 'ematl', 'phone', 'party', 'dtstr tct','state', 'assembly'1) house_url = 'https://mW.capttol.tn.gov/house/members/' house_page = requests.get(house_urt) house_soup = BeauttfutSoup(house_page. content, 'html, parser') house_table = house_soup.ftnd ('table') house_rows = house_table.find_all ('tr') [1:] for row in house_rows: columns = row.find_all(' td ' ) fname = columns[0]. text.strip() Iname = columns[1].text.strip() email = columns[2].find(' a ' ) text.strip() phone = columns[3].text.strip() party = columns[4].text.strip() district = colunns[5]. text.strip() state = 'Tennessee' assembly = 'House' writer.writerow( [' fname', 'Iname' , 'email', 'phone', 'party', 'district','state', 'assegbly']) senate_url = 'https://Wm. capitol.tn.gov/senate/members/' senate_page = requests.get(senate_url) senate_soup = BeauttfulSoup(senate_page.content, 'html. parser') party = cotumns (4, text. strtp() distrtct = columns[5]. text. strtp() state = 'Tennessee' assembly = 'House' writer.writerowil' 'fname', 'Iname', 'ematt', 'phone', 'party', 'dtstrtet', 'state', 'assembly' J) senate_urt = 'https://WW, capttol.th. gov/senate/members /' senate_page = requests.get(senate_urt) senate_soup = BeauttfutSoup(senate_page.content, 'htmleparser') senate_table = senate_soup.f ind( 'table') senate_rows = senate_table.ftnd_atl('tr' )[1:] for row in senate_rows: columins = row.find_all('td') fnane = columns[0].text.strip() Iname = columns[1] text.strip() ematl = columns[2].find(' a ') text. strip() phone = columns[3].text.strip() party = columns [4] text.strip() district = columns[5].text. strip() state = 'Tennessee assembly = 'Senate' writer.writerow( [' fname', ''name', 'email', 'phone', 'party', 'district', 'state' , 'assembly'']) Traceback (most recent call last): File "main.py", line 13, in