Created
April 5, 2020 01:05
-
-
Save jalbertbowden/1068f3ef3d9b39b910039c0b3de95c12 to your computer and use it in GitHub Desktop.
python encoding issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lxml import html | |
import requests | |
import json | |
virginia_nursing_facility_uris = ['https://www.vhi.org/Albemarle Health & Rehabilitation Center.html?tab=&?=nh1006/', 'https://www.vhi.org/Augusta Health - LTCU.html?tab=&?=nh6750/', 'https://www.vhi.org/Augusta Nursing and Rehabilitation Center.html?tab=&?=nh1551/', 'https://www.vhi.org/Autumn Care of Madison.html?tab=&?=nh2764/', 'https://www.vhi.org/Bowling Green Health & Rehabilitation Center.html?tab=&?=nh5611/', 'https://www.vhi.org/Bridgewater Home, Inc..html?tab=&?=nh8145/', 'https://www.vhi.org/Brookside Rehabilitation and Nursing Center.html?tab=&?=nh6181/', 'https://www.vhi.org/Carriage Hill Health & Rehab Center.html?tab=&?=nh1614/', 'https://www.vhi.org/Cedars Health & Rehab Center.html?tab=&?=nh2133/', 'https://www.vhi.org/Charlottesville Health & Rehabilitation Center.html?tab=&?=nh5100/', 'https://www.vhi.org/Consulate Health Care of Woodstock.html?tab=&?=nh2955/', 'https://www.vhi.org/Culpeper Health & Rehabilitation Center.html?tab=&?=nh8948/', 'https://www.vhi.org/Curis at Harrisonburg Transitional Care & Rehabilitation Center.html?tab=&?=nh8467/', 'https://www.vhi.org/Curis at Waynesboro Nursing & Rehabilitation Center.html?tab=&?=nh4168/', 'https://www.vhi.org/Dogwood Village of Orange Co Health & Rehabilitation.html?tab=&?=nh4811/', 'https://www.vhi.org/Envoy Health Care at The Village.html?tab=&?=nh3037/', 'https://www.vhi.org/Envoy Health Care of Staunton.html?tab=&?=nh8350/', 'https://www.vhi.org/Envoy Health Care of Winchester.html?tab=&?=nh3270/', 'https://www.vhi.org/Evergreen Health and Rehab. of Winchester.html?tab=&?=nh5666/', 'https://www.vhi.org/Fauquier Health Rehabilitation & Nursing Center.html?tab=&?=nh9391/', 'https://www.vhi.org/Fredricksburg Health and Rehab.html?tab=&?=nh3445/', 'https://www.vhi.org/Grace Health and Rehab Center of Greene County.html?tab=&?=nh1101/', 'https://www.vhi.org/Harrisonburg Health & Rehabilitation Center.html?tab=&?=nh2045/', 'https://www.vhi.org/Heritage Hall - Front Royal.html?tab=&?=nh2534/', 'https://www.vhi.org/Heritage Hall - King George.html?tab=&?=nh3748/', 'https://www.vhi.org/Heritage Hall - Lexington.html?tab=&?=nh1005/', 'https://www.vhi.org/Kings Daughters Health & Rehab.html?tab=&?=nh1104/', 'https://www.vhi.org/Laurels of Charlottesville.html?tab=&?=nh5785/', 'https://www.vhi.org/Life Care Center of New Market.html?tab=&?=nh1050/', 'https://www.vhi.org/Louisa Health & Rehabilitation Center.html?tab=&?=nh2144/', 'https://www.vhi.org/Martha Jefferson House.html?tab=&?=nh8349/', 'https://www.vhi.org/Monroe Health and Rehabilitation Center.html?tab=&?=nh5468/', 'https://www.vhi.org/Mountain View Nursing Home Inc..html?tab=&?=nh1918/', 'https://www.vhi.org/Our Lady of Peace.html?tab=&?=nh9260/', 'https://www.vhi.org/Rose Hill Health and Rehab.html?tab=&?=nh5663/', 'https://www.vhi.org/Shenandoah Nursing and Rehab Center.html?tab=&?=nh6096/', 'https://www.vhi.org/Shenandoah Valley Health and Rehab.html?tab=&?=nh6519/', 'https://www.vhi.org/Skyline Terrace Convalescent Home.html?tab=&?=nh7973/', 'https://www.vhi.org/Skyview Spring Rehab and Nursing Center.html?tab=&?=nh7889/', 'https://www.vhi.org/Springs Nursing Center.html?tab=&?=nh2561/', 'https://www.vhi.org/Stafford Healthcare Group Inc.html?tab=&?=nh6874/', 'https://www.vhi.org/Valley Health Warren Memorial Hospital - LTCU.html?tab=&?=nh6647/', 'https://www.vhi.org/VMRC, Complete Living Care.html?tab=&?=nh7304/', 'https://www.vhi.org/Woodmont Center.html?tab=&?=nh7274/', 'https://www.vhi.org/Birmingham Green.html?tab=&?=nh3381/', 'https://www.vhi.org/Burke Health & Rehabilitation Center.html?tab=&?=nh1757/', 'https://www.vhi.org/Cherrydale Health & Rehabilitation Center.html?tab=&?=nh1743/', 'https://www.vhi.org/Dulles Health and Rehab Center.html?tab=&?=nh1552/', 'https://www.vhi.org/Envoy Health Care of Woodbridge.html?tab=&?=nh7586/', 'https://www.vhi.org/Envoy Health of Alexandria.html?tab=&?=nh4054/', 'https://www.vhi.org/Fairfax Nursing Center, Inc.html?tab=&?=nh6936/', 'https://www.vhi.org/Gainesville Health & Rehabilitation Center.html?tab=&?=nh7653/', 'https://www.vhi.org/Heritage Hall - Leesburg.html?tab=&?=nh7214/', 'https://www.vhi.org/Iliff Nursing & Rehabilitation Center.html?tab=&?=nh5466/', 'https://www.vhi.org/Jefferson, The.html?tab=&?=nh4616/', 'https://www.vhi.org/Lake Manassas Health and Rehab.html?tab=&?=nh1868/', 'https://www.vhi.org/Leewood Healthcare Center.html?tab=&?=nh2058/', 'https://www.vhi.org/Loudoun Nursing & Rehabilitation Center.html?tab=&?=nh3358/', 'https://www.vhi.org/Manassas Health and Rehabilitation Center.html?tab=&?=nh8642/', 'https://www.vhi.org/Manor Care of Alexandria VA, LLC.html?tab=&?=nh4573/', 'https://www.vhi.org/Manor Care of Arlington VA, LLC.html?tab=&?=nh1190/', 'https://www.vhi.org/Manor Care-Fair Oaks of Fairfax VA, LLC.html?tab=&?=nh1428/', 'https://www.vhi.org/Mount Vernon Nursing & Rehabilitation Center.html?tab=&?=nh1091/', 'https://www.vhi.org/Potomac Falls Health and Rehab Center.html?tab=&?=nh1400/', 'https://www.vhi.org/Powhatan Nursing Home.html?tab=&?=nh7440/', 'https://www.vhi.org/Regency Care of Arlington LLC.html?tab=&?=nh7476/', 'https://www.vhi.org/Sleepy Hollow Health & Rehab Center.html?tab=&?=nh6790/', 'https://www.vhi.org/Woodbine Nursing & Rehabilitation Center.html?tab=&?=nh2349/', 'https://www.vhi.org/Abingdon Health & Rehab Center.html?tab=&?=nh9987/', 'https://www.vhi.org/AFS of BASTIAN.html?tab=&?=nh4564/', 'https://www.vhi.org/Alleghany Health and Rehab.html?tab=&?=nh8322/', 'https://www.vhi.org/Appomattox Health & Rehabilitation Center.html?tab=&?=nh1810/', 'https://www.vhi.org/Autumn Care of Altavista.html?tab=&?=nh8131/', 'https://www.vhi.org/Bedford County Nursing Home.html?tab=&?=nh1051/', 'https://www.vhi.org/Bedford Memorial Hospital - Oakwood.html?tab=&?=nh8090/', 'https://www.vhi.org/Berkshire Health & Rehabilitation Center.html?tab=&?=nh6464/', 'https://www.vhi.org/Blue Ridge Nursing Center.html?tab=&?=nh5035/', 'https://www.vhi.org/Blue Ridge Rehab Center.html?tab=&?=nh7803/', 'https://www.vhi.org/Brian Center Health & Rehab. - Alleghany.html?tab=&?=nh1306/', 'https://www.vhi.org/Brian Center Nursing Care - Fincastle.html?tab=&?=nh4768/', 'https://www.vhi.org/Carrington Place at Botetourt Commons.html?tab=&?=nh6865/', 'https://www.vhi.org/Carrington Place at Rural Retreat.html?tab=&?=nh9751/', 'https://www.vhi.org/Carrington Place at Wytheville.html?tab=&?=nh7148/', 'https://www.vhi.org/Carrington, The.html?tab=&?=nh5870/', 'https://www.vhi.org/Clinch Valley Medical Center - LTCU.html?tab=&?=nh4353/', 'https://www.vhi.org/Curis at Lynchburg Transitional Care & Rehabilitation Center.html?tab=&?=nh9303/', 'https://www.vhi.org/Curis at Roanoke Transitional Care & Rehabilitation Center.html?tab=&?=nh9672/', 'https://www.vhi.org/Danville Healthcare Group Inc.html?tab=&?=nh3143/', 'https://www.vhi.org/Fairmont Crossing Nursing Home.html?tab=&?=nh3295/', 'https://www.vhi.org/Francis Marion Manor Health & Rehabilitation.html?tab=&?=nh4615/', 'https://www.vhi.org/Franklin Health & Rehabilitation Center.html?tab=&?=nh1420/', 'https://www.vhi.org/Friendship Health and Rehab Center - South.html?tab=&?=nh9988/', 'https://www.vhi.org/Friendship Health and Rehab Center, Inc..html?tab=&?=nh3662/', 'https://www.vhi.org/Galax Health and Rehab.html?tab=&?=nh9224/', 'https://www.vhi.org/Genesis ElderCare Westwood.html?tab=&?=nh8525/', 'https://www.vhi.org/Grace Healthcare of Abingdon.html?tab=&?=nh5695/', 'https://www.vhi.org/Grayson Nursing & Rehabilitation Center.html?tab=&?=nh1048/', 'https://www.vhi.org/Gretna Health & Rehabilitation Center.html?tab=&?=nh4496/', 'https://www.vhi.org/Guggenheimer Nursing Home.html?tab=&?=nh6528/', 'https://www.vhi.org/Heritage Hall - Big Stone Gap.html?tab=&?=nh1095/', 'https://www.vhi.org/Heritage Hall - Blacksburg.html?tab=&?=nh8930/', 'https://www.vhi.org/Heritage Hall - Brookneal.html?tab=&?=nh3016/', 'https://www.vhi.org/Heritage Hall - Clintwood.html?tab=&?=nh1044/', 'https://www.vhi.org/Heritage Hall - Grundy.html?tab=&?=nh8034/', 'https://www.vhi.org/Heritage Hall - Laurel Meadows.html?tab=&?=nh9051/', 'https://www.vhi.org/Heritage Hall - Rich Creek.html?tab=&?=nh1720/', 'https://www.vhi.org/Heritage Hall - Tazewell.html?tab=&?=nh8376/', 'https://www.vhi.org/Heritage Hall - Wise.html?tab=&?=nh4629/', 'https://www.vhi.org/Highland Ridge Rehab Center.html?tab=&?=nh4600/', 'https://www.vhi.org/Hillsville Rehabilitation and Healthcare Center, LLC.html?tab=&?=nh2178/', 'https://www.vhi.org/Lee Health and Rehab Center.html?tab=&?=nh4062/', 'https://www.vhi.org/Liberty Ridge Health and Rehabilitation Center.html?tab=&?=nh1004/', 'https://www.vhi.org/Lynchburg Health & Rehabilitation Center.html?tab=&?=nh8351/', 'https://www.vhi.org/Maple Grove Health Care Center.html?tab=&?=nh7917/', 'https://www.vhi.org/Martinsville Health and Rehab.html?tab=&?=nh4177/', 'https://www.vhi.org/Medical Care Center-Lynchburg VA, LLC.html?tab=&?=nh6105/', 'https://www.vhi.org/Mountain View Regional Medical Center - LTCU.html?tab=&?=nh2034/', 'https://www.vhi.org/NHC Healthcare, Bristol.html?tab=&?=nh2794/', 'https://www.vhi.org/Nova Health and Rehabilitation Center.html?tab=&?=nh6525/', 'https://www.vhi.org/Our Lady of the Valley.html?tab=&?=nh3969/', 'https://www.vhi.org/Pheasant Ridge Nursing & Rehab Center.html?tab=&?=nh2158/', 'https://www.vhi.org/Piney Forest Health & Rehabilitation Center.html?tab=&?=nh8480/', 'https://www.vhi.org/Pulaski Health & Rehabilitation Center.html?tab=&?=nh4355/', 'https://www.vhi.org/Radford Health and Rehabilitation Center.html?tab=&?=nh2210/', 'https://www.vhi.org/Raleigh Court Health & Rehabilitation Center.html?tab=&?=nh4058/', 'https://www.vhi.org/Richfield Recovery and Care Center.html?tab=&?=nh2076/', 'https://www.vhi.org/Ridgecrest Manor Nursing and Rehabilitation.html?tab=&?=nh4553/', 'https://www.vhi.org/Riverside Health & Rehabilitation Center.html?tab=&?=nh9011/', 'https://www.vhi.org/Rocky Mountain Rehabilitation and Healthcare Center, LLC.html?tab=&?=nh5174/', 'https://www.vhi.org/Roman Eagle Rehabilitation and Health Care Center, Inc..html?tab=&?=nh3847/', 'https://www.vhi.org/Salem Health & Rehabilitation Center.html?tab=&?=nh9671/', 'https://www.vhi.org/Skyline Nursing and Rehabilitation Center.html?tab=&?=nh7737/', 'https://www.vhi.org/Snyder Nursing Home.html?tab=&?=nh7911/', 'https://www.vhi.org/South Roanoke Nursing Home.html?tab=&?=nh2997/', 'https://www.vhi.org/Springtree Health & Rehabilitation Center.html?tab=&?=nh3815/', 'https://www.vhi.org/Stanleytown Health & Rehabilitation Center.html?tab=&?=nh7524/', 'https://www.vhi.org/Summit Health & Rehabilitation Center.html?tab=&?=nh4875/', 'https://www.vhi.org/The Wybe & Marietje Kroontje Health Care Center.html?tab=&?=nh9652/', 'https://www.vhi.org/Valley Health Care Center.html?tab=&?=nh6209/', 'https://www.vhi.org/Virginia Veterans Care Center.html?tab=&?=nh1424/', 'https://www.vhi.org/Waddell Nursing and Rehab Center.html?tab=&?=nh2358/', 'https://www.vhi.org/West Point Health and Rehabilitation Center.html?tab=&?=nh4486/', 'https://www.vhi.org/Woodhaven Nursing Home.html?tab=&?=nh7955/', 'https://www.vhi.org/Woodlands Health and Rehab.html?tab=&?=nh8071/', 'https://www.vhi.org/Wythe County Community Hospital - LTCU.html?tab=&?=nh2354/', 'https://www.vhi.org/Amelia Nursing Center.html?tab=&?=nh5894/', 'https://www.vhi.org/Ashland Nursing & Rehabilitation Center.html?tab=&?=nh7515/', 'https://www.vhi.org/Autumn Care of Mechanicsville.html?tab=&?=nh1003/', 'https://www.vhi.org/Battlefield Park Health & Rehab Center.html?tab=&?=nh7283/', 'https://www.vhi.org/Beaufont Health & Rehabilitation Center.html?tab=&?=nh1293/', 'https://www.vhi.org/Berry Hill Nursing Home.html?tab=&?=nh3352/', 'https://www.vhi.org/Beth Sholom Home of Virginia.html?tab=&?=nh5708/', 'https://www.vhi.org/Bonview Rehabilitation and Healthcare (Formerly Envoy of Stratford Hills).html?tab=&?=nh5354/', 'https://www.vhi.org/Brandermill Woods Health Care Center.html?tab=&?=nh5603/', 'https://www.vhi.org/Chase City Health and Rehab Center.html?tab=&?=nh2458/', 'https://www.vhi.org/Chesterfield Health & Rehab.html?tab=&?=nh6578/', 'https://www.vhi.org/Childrens Hospital of Richmond .html?tab=&?=nh6362/', 'https://www.vhi.org/Colonial Heights Health Care and Rehabilitatin Center.html?tab=&?=nh5551/', 'https://www.vhi.org/Dinwiddie Health and Rehabilitation Center.html?tab=&?=nh6325/', 'https://www.vhi.org/Elizabeth Adam Crump Health and Rehab.html?tab=&?=nh7600/', 'https://www.vhi.org/Emporia Manor.html?tab=&?=nh7166/', 'https://www.vhi.org/Envoy Health Care at The Meadows.html?tab=&?=nh1577/', 'https://www.vhi.org/Envoy Health Care of Lawrenceville.html?tab=&?=nh3013/', 'https://www.vhi.org/Envoy Health Care of Westover Hills.html?tab=&?=nh8203/', 'https://www.vhi.org/Farmville Rehabilitation and Healthcare Center, LLC.html?tab=&?=nh9605/', 'https://www.vhi.org/Glenburnie Rehabilitation and Nursing Center.html?tab=&?=nh9986/', 'https://www.vhi.org/Greensville Manor.html?tab=&?=nh4532/', 'https://www.vhi.org/Hanover Health & Rehabilitation Center.html?tab=&?=nh6772/', 'https://www.vhi.org/Henrico Health & Rehabilitation Center.html?tab=&?=nh6323/', 'https://www.vhi.org/Heritage Hall - Blackstone.html?tab=&?=nh6634/', 'https://www.vhi.org/Heritage Hall - Dillwyn.html?tab=&?=nh2062/', 'https://www.vhi.org/Hopewell Health Care Center.html?tab=&?=nh3251/', 'https://www.vhi.org/Laurels of Bon Air.html?tab=&?=nh8695/', 'https://www.vhi.org/Laurels of University Park.html?tab=&?=nh2253/', 'https://www.vhi.org/Laurels of Willow Creek.html?tab=&?=nh5558/', 'https://www.vhi.org/Lexington Court Nursing and Rehabilitation.html?tab=&?=nh1889/', 'https://www.vhi.org/Little Sisters of the Poor.html?tab=&?=nh9067/', 'https://www.vhi.org/Manor Care-Imperial of Richmond VA, LLC.html?tab=&?=nh1399/', 'https://www.vhi.org/Manor Care-Richmond .html?tab=&?=nh2675/', 'https://www.vhi.org/Our Lady of Hope Health Center.html?tab=&?=nh5025/', 'https://www.vhi.org/Parham Healthcare & Rehabilitation Center.html?tab=&?=nh9963/', 'https://www.vhi.org/Petersburg Health & Rehab Center.html?tab=&?=nh7814/', 'https://www.vhi.org/River View on the Appomattox.html?tab=&?=nh9674/', 'https://www.vhi.org/Sentara MeadowView Terrace.html?tab=&?=nh9595/', 'https://www.vhi.org/Sentara Woodview.html?tab=&?=nh6530/', 'https://www.vhi.org/Sitter and Barfoot Veterans Care Center.html?tab=&?=nh4296/', 'https://www.vhi.org/The Woodland.html?tab=&?=nh9634/', 'https://www.vhi.org/VCU-CMH Hundley Center.html?tab=&?=nh2666/', 'https://www.vhi.org/Virginia Home, The.html?tab=&?=nh4124/', 'https://www.vhi.org/Waverly Health & Rehabilitation Center.html?tab=&?=nh4079/', 'https://www.vhi.org/Wayland Nursing and Rehabilitation Center.html?tab=&?=nh8042/', 'https://www.vhi.org/Westport Rehabilitation and Nursing Center.html?tab=&?=nh3094/', 'https://www.vhi.org/Autumn Care of Chesapeake.html?tab=&?=nh5091/', 'https://www.vhi.org/Autumn Care of Norfolk.html?tab=&?=nh7144/', 'https://www.vhi.org/Autumn Care of Portsmouth.html?tab=&?=nh1100/', 'https://www.vhi.org/Autumn Care of Suffolk.html?tab=&?=nh7922/', 'https://www.vhi.org/Bayside Health & Rehabilitation Center.html?tab=&?=nh1712/', 'https://www.vhi.org/Bayside of Poquoson Health and Rehab.html?tab=&?=nh4035/', 'https://www.vhi.org/Beth Sholom Home of Eastern Virginia.html?tab=&?=nh5889/', 'https://www.vhi.org/Bon Secours DePaul Medical Center - TCC.html?tab=&?=nh1942/', 'https://www.vhi.org/Bon Secours Maryview Nursing Care Center.html?tab=&?=nh8380/', 'https://www.vhi.org/Bon Secours St. Francis Nursing Center.html?tab=&?=nh1137/', 'https://www.vhi.org/Carrington Place of Chesapeake.html?tab=&?=nh2949/', 'https://www.vhi.org/Carrington Place of Tappahannock.html?tab=&?=nh4621/', 'https://www.vhi.org/Chesapeake Health & Rehabilitation Center.html?tab=&?=nh8580/', 'https://www.vhi.org/Coliseum Convalscent and Rehabilitation Center.html?tab=&?=nh8107/', 'https://www.vhi.org/Concordia Nursing & Rehabilitation- River Pointe .html?tab=&?=nh2533/', 'https://www.vhi.org/Concordia Transitional Care and Rehab- Nansemond Pointe .html?tab=&?=nh2456/', 'https://www.vhi.org/Concordia Transitional Care and Rehabilitation - Bay Pointe.html?tab=&?=nh5152/', 'https://www.vhi.org/Consulate Health Care of Norfolk.html?tab=&?=nh9847/', 'https://www.vhi.org/Consulate Healthcare at Williamsburg.html?tab=&?=nh5812/', 'https://www.vhi.org/Consulate Healthcare of Windsor.html?tab=&?=nh9844/', 'https://www.vhi.org/Courtland Health & Rehabilitation Center.html?tab=&?=nh7776/', 'https://www.vhi.org/Envoy Health Care of Williamsburg.html?tab=&?=nh2662/', 'https://www.vhi.org/Francis N. Sanders Nursing Home.html?tab=&?=nh2187/', 'https://www.vhi.org/Hampton Healthcare and Rehab Center.html?tab=&?=nh6427/', 'https://www.vhi.org/Harbour Pointe Healthcare and Rehabilitation Center .html?tab=&?=nh4700/', 'https://www.vhi.org/Heritage Hall - Nassawadox.html?tab=&?=nh6951/', 'https://www.vhi.org/Heritage Hall - Virginia Beach.html?tab=&?=nh5949/', 'https://www.vhi.org/James River Convalescent and Rehabilitation Center.html?tab=&?=nh9491/', 'https://www.vhi.org/Lake Taylor Hospital - LTCU.html?tab=&?=nh6512/', 'https://www.vhi.org/Lancashire Convalescent and Rehab. Center.html?tab=&?=nh9276/', 'https://www.vhi.org/Mizpah Healthcare Group LLC.html?tab=&?=nh7181/', 'https://www.vhi.org/Newport News Nursing and Rehabilitation Center.html?tab=&?=nh2626/', 'https://www.vhi.org/Newport, The.html?tab=&?=nh3509/', 'https://www.vhi.org/Norfolk Health & Rehabilitation Center.html?tab=&?=nh7457/', 'https://www.vhi.org/Northampton Convalescent Center.html?tab=&?=nh6854/', 'https://www.vhi.org/Our Lady of Perpetual Help Health Center.html?tab=&?=nh7765/', 'https://www.vhi.org/Portsmouth Health and Rehab.html?tab=&?=nh2199/', 'https://www.vhi.org/Princess Anne Health and Rehab.html?tab=&?=nh1053/', 'https://www.vhi.org/Regency Health & Rehabilitation Center.html?tab=&?=nh5176/', 'https://www.vhi.org/Riverside Convalescent Center - Hampton.html?tab=&?=nh7439/', 'https://www.vhi.org/Riverside Convalescent Center - Mathews.html?tab=&?=nh3726/', 'https://www.vhi.org/Riverside Convalescent Center - Saluda.html?tab=&?=nh1870/', 'https://www.vhi.org/Riverside Convalescent Center - Smithfield.html?tab=&?=nh7837/', 'https://www.vhi.org/Riverside Convalescent Center - West Point.html?tab=&?=nh1275/', 'https://www.vhi.org/Sentara Nursing Center - Chesapeake.html?tab=&?=nh1790/', 'https://www.vhi.org/Sentara Nursing Center - Hampton.html?tab=&?=nh6406/', 'https://www.vhi.org/Sentara Nursing Center - Norfolk.html?tab=&?=nh3878/', 'https://www.vhi.org/Sentara Nursing Center - Portsmouth.html?tab=&?=nh9743/', 'https://www.vhi.org/Sentara Nursing Center - Virginia Beach.html?tab=&?=nh3138/', 'https://www.vhi.org/Sentara Nursing Center Windermere.html?tab=&?=nh1871/', 'https://www.vhi.org/Shore Health and Rehabilitation Center.html?tab=&?=nh5405/', 'https://www.vhi.org/Southampton Memorial Hospital - LTCU.html?tab=&?=nh4094/', 'https://www.vhi.org/The Citadel Virginia Beach.html?tab=&?=nh5537/', 'https://www.vhi.org/The Gardens at Warwick Forest.html?tab=&?=nh5901/', 'https://www.vhi.org/The Orchard.html?tab=&?=nh6752/', 'https://www.vhi.org/Thornton Hall Nursing and Rehab Center.html?tab=&?=nh2531/', 'https://www.vhi.org/Virginia Beach Healthcare & Rehabilitation Center.html?tab=&?=nh9547/', 'https://www.vhi.org/Walter Reed Convalescent & Rehab. Center.html?tab=&?=nh7319/', 'https://www.vhi.org/Westmoreland Rehabilitation and Healthcare.html?tab=&?=nh6513/', 'https://www.vhi.org/York Convalescent Center.html?tab=&?=nh3363/'] | |
virginia_nursing_facility_names = ['Albemarle Health & Rehabilitation Center', 'Augusta Health - LTCU', 'Augusta Nursing and Rehabilitation Center', 'Autumn Care of Madison', 'Bowling Green Health & Rehabilitation Center', 'Bridgewater Home, Inc.', 'Brookside Rehabilitation and Nursing Center', 'Carriage Hill Health & Rehab Center', 'Cedars Health & Rehab Center', 'Charlottesville Health & Rehabilitation Center', 'Consulate Health Care of Woodstock', 'Culpeper Health & Rehabilitation Center', 'Curis at Harrisonburg Transitional Care & Rehabilitation Center', 'Curis at Waynesboro Nursing & Rehabilitation Center', 'Dogwood Village of Orange Co Health & Rehabilitation', 'Envoy Health Care at The Village', 'Envoy Health Care of Staunton', 'Envoy Health Care of Winchester', 'Evergreen Health and Rehab. of Winchester', 'Fauquier Health Rehabilitation & Nursing Center', 'Fredricksburg Health and Rehab', 'Grace Health and Rehab Center of Greene County', 'Harrisonburg Health & Rehabilitation Center', 'Heritage Hall - Front Royal', 'Heritage Hall - King George', 'Heritage Hall - Lexington', 'Kings Daughters Health & Rehab', 'Laurels of Charlottesville', 'Life Care Center of New Market', 'Louisa Health & Rehabilitation Center', 'Martha Jefferson House', 'Monroe Health and Rehabilitation Center', 'Mountain View Nursing Home Inc.', 'Our Lady of Peace', 'Rose Hill Health and Rehab', 'Shenandoah Nursing and Rehab Center', 'Shenandoah Valley Health and Rehab', 'Skyline Terrace Convalescent Home', 'Skyview Spring Rehab and Nursing Center', 'Springs Nursing Center', 'Stafford Healthcare Group Inc', 'Valley Health Warren Memorial Hospital - LTCU', 'VMRC, Complete Living Care', 'Woodmont Center', 'Birmingham Green', 'Burke Health & Rehabilitation Center', 'Cherrydale Health & Rehabilitation Center', 'Dulles Health and Rehab Center', 'Envoy Health Care of Woodbridge', 'Envoy Health of Alexandria', 'Fairfax Nursing Center, Inc', 'Gainesville Health & Rehabilitation Center', 'Heritage Hall - Leesburg', 'Iliff Nursing & Rehabilitation Center', 'Jefferson, The', 'Lake Manassas Health and Rehab', 'Leewood Healthcare Center', 'Loudoun Nursing & Rehabilitation Center', 'Manassas Health and Rehabilitation Center', 'Manor Care of Alexandria VA, LLC', 'Manor Care of Arlington VA, LLC', 'Manor Care-Fair Oaks of Fairfax VA, LLC', 'Mount Vernon Nursing & Rehabilitation Center', 'Potomac Falls Health and Rehab Center', 'Powhatan Nursing Home', 'Regency Care of Arlington LLC', 'Sleepy Hollow Health & Rehab Center', 'Woodbine Nursing & Rehabilitation Center', 'Abingdon Health & Rehab Center', 'AFS of BASTIAN', 'Alleghany Health and Rehab', 'Appomattox Health & Rehabilitation Center', 'Autumn Care of Altavista', 'Bedford County Nursing Home', 'Bedford Memorial Hospital - Oakwood', 'Berkshire Health & Rehabilitation Center', 'Blue Ridge Nursing Center', 'Blue Ridge Rehab Center', 'Brian Center Health & Rehab. - Alleghany', 'Brian Center Nursing Care - Fincastle', 'Carrington Place at Botetourt Commons', 'Carrington Place at Rural Retreat', 'Carrington Place at Wytheville', 'Carrington, The', 'Clinch Valley Medical Center - LTCU', 'Curis at Lynchburg Transitional Care & Rehabilitation Center', 'Curis at Roanoke Transitional Care & Rehabilitation Center', 'Danville Healthcare Group Inc', 'Fairmont Crossing Nursing Home', 'Francis Marion Manor Health & Rehabilitation', 'Franklin Health & Rehabilitation Center', 'Friendship Health and Rehab Center - South', 'Friendship Health and Rehab Center, Inc.', 'Galax Health and Rehab', 'Genesis ElderCare Westwood', 'Grace Healthcare of Abingdon', 'Grayson Nursing & Rehabilitation Center', 'Gretna Health & Rehabilitation Center', 'Guggenheimer Nursing Home', 'Heritage Hall - Big Stone Gap', 'Heritage Hall - Blacksburg', 'Heritage Hall - Brookneal', 'Heritage Hall - Clintwood', 'Heritage Hall - Grundy', 'Heritage Hall - Laurel Meadows', 'Heritage Hall - Rich Creek', 'Heritage Hall - Tazewell', 'Heritage Hall - Wise', 'Highland Ridge Rehab Center', 'Hillsville Rehabilitation and Healthcare Center, LLC', 'Lee Health and Rehab Center', 'Liberty Ridge Health and Rehabilitation Center', 'Lynchburg Health & Rehabilitation Center', 'Maple Grove Health Care Center', 'Martinsville Health and Rehab', 'Medical Care Center-Lynchburg VA, LLC', 'Mountain View Regional Medical Center - LTCU', 'NHC Healthcare, Bristol', 'Nova Health and Rehabilitation Center', 'Our Lady of the Valley', 'Pheasant Ridge Nursing & Rehab Center', 'Piney Forest Health & Rehabilitation Center', 'Pulaski Health & Rehabilitation Center', 'Radford Health and Rehabilitation Center', 'Raleigh Court Health & Rehabilitation Center', 'Richfield Recovery and Care Center', 'Ridgecrest Manor Nursing and Rehabilitation', 'Riverside Health & Rehabilitation Center', 'Rocky Mountain Rehabilitation and Healthcare Center, LLC', 'Roman Eagle Rehabilitation and Health Care Center, Inc.', 'Salem Health & Rehabilitation Center', 'Skyline Nursing and Rehabilitation Center', 'Snyder Nursing Home', 'South Roanoke Nursing Home', 'Springtree Health & Rehabilitation Center', 'Stanleytown Health & Rehabilitation Center', 'Summit Health & Rehabilitation Center', 'The Wybe & Marietje Kroontje Health Care Center', 'Valley Health Care Center', 'Virginia Veterans Care Center', 'Waddell Nursing and Rehab Center', 'West Point Health and Rehabilitation Center', 'Woodhaven Nursing Home', 'Woodlands Health and Rehab', 'Wythe County Community Hospital - LTCU', 'Amelia Nursing Center', 'Ashland Nursing & Rehabilitation Center', 'Autumn Care of Mechanicsville', 'Battlefield Park Health & Rehab Center', 'Beaufont Health & Rehabilitation Center', 'Berry Hill Nursing Home', 'Beth Sholom Home of Virginia', 'Bonview Rehabilitation and Healthcare (Formerly Envoy of Stratford Hills)', 'Brandermill Woods Health Care Center', 'Chase City Health and Rehab Center', 'Chesterfield Health & Rehab', 'Childrens Hospital of Richmond ', 'Colonial Heights Health Care and Rehabilitatin Center', 'Dinwiddie Health and Rehabilitation Center', 'Elizabeth Adam Crump Health and Rehab', 'Emporia Manor', 'Envoy Health Care at The Meadows', 'Envoy Health Care of Lawrenceville', 'Envoy Health Care of Westover Hills', 'Farmville Rehabilitation and Healthcare Center, LLC', 'Glenburnie Rehabilitation and Nursing Center', 'Greensville Manor', 'Hanover Health & Rehabilitation Center', 'Henrico Health & Rehabilitation Center', 'Heritage Hall - Blackstone', 'Heritage Hall - Dillwyn', 'Hopewell Health Care Center', 'Laurels of Bon Air', 'Laurels of University Park', 'Laurels of Willow Creek', 'Lexington Court Nursing and Rehabilitation', 'Little Sisters of the Poor', 'Manor Care-Imperial of Richmond VA, LLC', 'Manor Care-Richmond ', 'Our Lady of Hope Health Center', 'Parham Healthcare & Rehabilitation Center', 'Petersburg Health & Rehab Center', 'River View on the Appomattox', 'Sentara MeadowView Terrace', 'Sentara Woodview', 'Sitter and Barfoot Veterans Care Center', 'The Woodland', 'VCU-CMH Hundley Center', 'Virginia Home, The', 'Waverly Health & Rehabilitation Center', 'Wayland Nursing and Rehabilitation Center', 'Westport Rehabilitation and Nursing Center', 'Autumn Care of Chesapeake', 'Autumn Care of Norfolk', 'Autumn Care of Portsmouth', 'Autumn Care of Suffolk', 'Bayside Health & Rehabilitation Center', 'Bayside of Poquoson Health and Rehab', 'Beth Sholom Home of Eastern Virginia', 'Bon Secours DePaul Medical Center - TCC', 'Bon Secours Maryview Nursing Care Center', 'Bon Secours St. Francis Nursing Center', 'Carrington Place of Chesapeake', 'Carrington Place of Tappahannock', 'Chesapeake Health & Rehabilitation Center', 'Coliseum Convalscent and Rehabilitation Center', 'Concordia Nursing & Rehabilitation- River Pointe ', 'Concordia Transitional Care and Rehab- Nansemond Pointe ', 'Concordia Transitional Care and Rehabilitation - Bay Pointe', 'Consulate Health Care of Norfolk', 'Consulate Healthcare at Williamsburg', 'Consulate Healthcare of Windsor', 'Courtland Health & Rehabilitation Center', 'Envoy Health Care of Williamsburg', 'Francis N. Sanders Nursing Home', 'Hampton Healthcare and Rehab Center', 'Harbour Pointe Healthcare and Rehabilitation Center ', 'Heritage Hall - Nassawadox', 'Heritage Hall - Virginia Beach', 'James River Convalescent and Rehabilitation Center', 'Lake Taylor Hospital - LTCU', 'Lancashire Convalescent and Rehab. Center', 'Mizpah Healthcare Group LLC', 'Newport News Nursing and Rehabilitation Center', 'Newport, The', 'Norfolk Health & Rehabilitation Center', 'Northampton Convalescent Center', 'Our Lady of Perpetual Help Health Center', 'Portsmouth Health and Rehab', 'Princess Anne Health and Rehab', 'Regency Health & Rehabilitation Center', 'Riverside Convalescent Center - Hampton', 'Riverside Convalescent Center - Mathews', 'Riverside Convalescent Center - Saluda', 'Riverside Convalescent Center - Smithfield', 'Riverside Convalescent Center - West Point', 'Sentara Nursing Center - Chesapeake', 'Sentara Nursing Center - Hampton', 'Sentara Nursing Center - Norfolk', 'Sentara Nursing Center - Portsmouth', 'Sentara Nursing Center - Virginia Beach', 'Sentara Nursing Center Windermere', 'Shore Health and Rehabilitation Center', 'Southampton Memorial Hospital - LTCU', 'The Citadel Virginia Beach', 'The Gardens at Warwick Forest', 'The Orchard', 'Thornton Hall Nursing and Rehab Center', 'Virginia Beach Healthcare & Rehabilitation Center', 'Walter Reed Convalescent & Rehab. Center', 'Westmoreland Rehabilitation and Healthcare', 'York Convalescent Center'] | |
# virginia_nursing_facility_names = ['Albemarle Health & Rehabilitation Center', 'Augusta Health - LTCU', 'Augusta Nursing and Rehabilitation Center', 'Autumn Care of Madison', 'Bowling Green Health & Rehabilitation Center', 'Bridgewater Home, Inc.', 'Brookside Rehabilitation and Nursing Center', 'Carriage Hill Health & Rehab Center', 'Cedars Health & Rehab Center', 'Charlottesville Health & Rehabilitation Center', 'Consulate Health Care of Woodstock', 'Culpeper Health & Rehabilitation Center', 'Curis at Harrisonburg Transitional Care & Rehabilitation Center', 'Curis at Waynesboro Nursing & Rehabilitation Center', 'Dogwood Village of Orange Co Health & Rehabilitation', 'Envoy Health Care at The Village', 'Envoy Health Care of Staunton', 'Envoy Health Care of Winchester', 'Evergreen Health and Rehab. of Winchester', 'Fauquier Health Rehabilitation & Nursing Center', 'Fredricksburg Health and Rehab', 'Grace Health and Rehab Center of Greene County', 'Harrisonburg Health & Rehabilitation Center', 'Heritage Hall - Front Royal', 'Heritage Hall - King George', 'Heritage Hall - Lexington', 'Kings Daughters Health & Rehab', 'Laurels of Charlottesville', 'Life Care Center of New Market', 'Louisa Health & Rehabilitation Center', 'Martha Jefferson House', 'Monroe Health and Rehabilitation Center', 'Mountain View Nursing Home Inc.', 'Our Lady of Peace', 'Rose Hill Health and Rehab', 'Shenandoah Nursing and Rehab Center', 'Shenandoah Valley Health and Rehab', 'Skyline Terrace Convalescent Home', 'Skyview Spring Rehab and Nursing Center', 'Springs Nursing Center', 'Stafford Healthcare Group Inc', 'Valley Health Warren Memorial Hospital - LTCU', 'VMRC, Complete Living Care', 'Woodmont Center', 'Birmingham Green', 'Burke Health & Rehabilitation Center', 'Cherrydale Health & Rehabilitation Center', 'Dulles Health and Rehab Center', 'Envoy Health Care of Woodbridge', 'Envoy Health of Alexandria', 'Fairfax Nursing Center, Inc', 'Gainesville Health & Rehabilitation Center', 'Heritage Hall - Leesburg', 'Iliff Nursing & Rehabilitation Center', 'Jefferson, The', 'Lake Manassas Health and Rehab', 'Leewood Healthcare Center', 'Loudoun Nursing & Rehabilitation Center', 'Manassas Health and Rehabilitation Center', 'Manor Care of Alexandria VA, LLC', 'Manor Care of Arlington VA, LLC', 'Manor Care-Fair Oaks of Fairfax VA, LLC', 'Mount Vernon Nursing & Rehabilitation Center', 'Potomac Falls Health and Rehab Center', 'Powhatan Nursing Home', 'Regency Care of Arlington LLC', 'Sleepy Hollow Health & Rehab Center', 'Woodbine Nursing & Rehabilitation Center', 'Abingdon Health & Rehab Center', 'AFS of BASTIAN', 'Alleghany Health and Rehab', 'Appomattox Health & Rehabilitation Center', 'Autumn Care of Altavista', 'Bedford County Nursing Home', 'Bedford Memorial Hospital - Oakwood', 'Berkshire Health & Rehabilitation Center', 'Blue Ridge Nursing Center', 'Blue Ridge Rehab Center', 'Brian Center Health & Rehab. - Alleghany', 'Brian Center Nursing Care - Fincastle', 'Carrington Place at Botetourt Commons', 'Carrington Place at Rural Retreat', 'Carrington Place at Wytheville', 'Carrington, The', 'Clinch Valley Medical Center - LTCU', 'Curis at Lynchburg Transitional Care & Rehabilitation Center', 'Curis at Roanoke Transitional Care & Rehabilitation Center', 'Danville Healthcare Group Inc', 'Fairmont Crossing Nursing Home', 'Francis Marion Manor Health & Rehabilitation', 'Franklin Health & Rehabilitation Center', 'Friendship Health and Rehab Center - South', 'Friendship Health and Rehab Center, Inc.', 'Galax Health and Rehab', 'Genesis ElderCare Westwood', 'Grace Healthcare of Abingdon', 'Grayson Nursing & Rehabilitation Center', 'Gretna Health & Rehabilitation Center', 'Guggenheimer Nursing Home', 'Heritage Hall - Big Stone Gap', 'Heritage Hall - Blacksburg', 'Heritage Hall - Brookneal', 'Heritage Hall - Clintwood', 'Heritage Hall - Grundy', 'Heritage Hall - Laurel Meadows', 'Heritage Hall - Rich Creek', 'Heritage Hall - Tazewell', 'Heritage Hall - Wise', 'Highland Ridge Rehab Center', 'Hillsville Rehabilitation and Healthcare Center, LLC', 'Lee Health and Rehab Center', 'Liberty Ridge Health and Rehabilitation Center', 'Lynchburg Health & Rehabilitation Center', 'Maple Grove Health Care Center', 'Martinsville Health and Rehab', 'Medical Care Center-Lynchburg VA, LLC', 'Mountain View Regional Medical Center - LTCU', 'NHC Healthcare, Bristol', 'Nova Health and Rehabilitation Center', 'Our Lady of the Valley', 'Pheasant Ridge Nursing & Rehab Center', 'Piney Forest Health & Rehabilitation Center', 'Pulaski Health & Rehabilitation Center', 'Radford Health and Rehabilitation Center', 'Raleigh Court Health & Rehabilitation Center', 'Richfield Recovery and Care Center', 'Ridgecrest Manor Nursing and Rehabilitation', 'Riverside Health & Rehabilitation Center', 'Rocky Mountain Rehabilitation and Healthcare Center, LLC', 'Roman Eagle Rehabilitation and Health Care Center, Inc.', 'Salem Health & Rehabilitation Center', 'Skyline Nursing and Rehabilitation Center', 'Snyder Nursing Home', 'South Roanoke Nursing Home', 'Springtree Health & Rehabilitation Center', 'Stanleytown Health & Rehabilitation Center', 'Summit Health & Rehabilitation Center', 'The Wybe & Marietje Kroontje Health Care Center', 'Valley Health Care Center', 'Virginia Veterans Care Center', 'Waddell Nursing and Rehab Center', 'West Point Health and Rehabilitation Center', 'Woodhaven Nursing Home', 'Woodlands Health and Rehab', 'Wythe County Community Hospital - LTCU', 'Amelia Nursing Center', 'Ashland Nursing & Rehabilitation Center', 'Autumn Care of Mechanicsville', 'Battlefield Park Health & Rehab Center', 'Beaufont Health & Rehabilitation Center', 'Berry Hill Nursing Home', 'Beth Sholom Home of Virginia', 'Bonview Rehabilitation and Healthcare (Formerly Envoy of Stratford Hills)', 'Brandermill Woods Health Care Center', 'Chase City Health and Rehab Center', 'Chesterfield Health & Rehab', 'Childrens Hospital of Richmond ', 'Colonial Heights Health Care and Rehabilitatin Center', 'Dinwiddie Health and Rehabilitation Center', 'Elizabeth Adam Crump Health and Rehab', 'Emporia Manor', 'Envoy Health Care at The Meadows', 'Envoy Health Care of Lawrenceville', 'Envoy Health Care of Westover Hills', 'Farmville Rehabilitation and Healthcare Center, LLC', 'Glenburnie Rehabilitation and Nursing Center', 'Greensville Manor', 'Hanover Health & Rehabilitation Center', 'Henrico Health & Rehabilitation Center', 'Heritage Hall - Blackstone', 'Heritage Hall - Dillwyn', 'Hopewell Health Care Center', 'Laurels of Bon Air', 'Laurels of University Park', 'Laurels of Willow Creek', 'Lexington Court Nursing and Rehabilitation', 'Little Sisters of the Poor', 'Manor Care-Imperial of Richmond VA, LLC', 'Manor Care-Richmond ', 'Our Lady of Hope Health Center', 'Parham Healthcare & Rehabilitation Center', 'Petersburg Health & Rehab Center', 'River View on the Appomattox', 'Sentara MeadowView Terrace', 'Sentara Woodview', 'Sitter and Barfoot Veterans Care Center', 'The Woodland', 'VCU-CMH Hundley Center', 'Virginia Home, The', 'Waverly Health & Rehabilitation Center', 'Wayland Nursing and Rehabilitation Center', 'Westport Rehabilitation and Nursing Center', 'Autumn Care of Chesapeake', 'Autumn Care of Norfolk', 'Autumn Care of Portsmouth', 'Autumn Care of Suffolk', 'Bayside Health & Rehabilitation Center', 'Bayside of Poquoson Health and Rehab', 'Beth Sholom Home of Eastern Virginia', 'Bon Secours DePaul Medical Center - TCC', 'Bon Secours Maryview Nursing Care Center', 'Bon Secours St. Francis Nursing Center', 'Carrington Place of Chesapeake', 'Carrington Place of Tappahannock', 'Chesapeake Health & Rehabilitation Center', 'Coliseum Convalscent and Rehabilitation Center', 'Concordia Nursing & Rehabilitation- River Pointe ', 'Concordia Transitional Care and Rehab- Nansemond Pointe ', 'Concordia Transitional Care and Rehabilitation - Bay Pointe', 'Consulate Health Care of Norfolk', 'Consulate Healthcare at Williamsburg', 'Consulate Healthcare of Windsor', 'Courtland Health & Rehabilitation Center', 'Envoy Health Care of Williamsburg', 'Francis N. Sanders Nursing Home', 'Hampton Healthcare and Rehab Center', 'Harbour Pointe Healthcare and Rehabilitation Center ', 'Heritage Hall - Nassawadox', 'Heritage Hall - Virginia Beach', 'James River Convalescent and Rehabilitation Center', 'Lake Taylor Hospital - LTCU', 'Lancashire Convalescent and Rehab. Center', 'Mizpah Healthcare Group LLC', 'Newport News Nursing and Rehabilitation Center', 'Newport, The', 'Norfolk Health & Rehabilitation Center', 'Northampton Convalescent Center', 'Our Lady of Perpetual Help Health Center', 'Portsmouth Health and Rehab', 'Princess Anne Health and Rehab', 'Regency Health & Rehabilitation Center', 'Riverside Convalescent Center - Hampton', 'Riverside Convalescent Center - Mathews', 'Riverside Convalescent Center - Saluda', 'Riverside Convalescent Center - Smithfield', 'Riverside Convalescent Center - West Point', 'Sentara Nursing Center - Chesapeake', 'Sentara Nursing Center - Hampton', 'Sentara Nursing Center - Norfolk', 'Sentara Nursing Center - Portsmouth', 'Sentara Nursing Center - Virginia Beach', 'Sentara Nursing Center Windermere', 'Shore Health and Rehabilitation Center', 'Southampton Memorial Hospital - LTCU', 'The Citadel Virginia Beach', 'The Gardens at Warwick Forest', 'The Orchard', 'Thornton Hall Nursing and Rehab Center', 'Virginia Beach Healthcare & Rehabilitation Center', 'Walter Reed Convalescent & Rehab. Center', 'Westmoreland Rehabilitation and Healthcare', 'York Convalescent Center'] | |
print("names : ", len(virginia_nursing_facility_names)) | |
print(len(virginia_nursing_facility_uris)) | |
nursing_facility_data = {} | |
td_elements = [] | |
h1_text = [] | |
nursing_facility_data['nursing_facility'] = [] | |
nursing_facility_data_names = [] | |
nursing_facility_count = 0 | |
td_texts = [] | |
td_text_smalls = [] | |
names_hhh = [] | |
def scrape_uris(virginia_nursing_facility_uris, virginia_nursing_facility_names, nursing_facility_count): | |
for virginia_nursing_facility_uri in virginia_nursing_facility_uris: | |
page = requests.get(virginia_nursing_facility_uri) | |
tree = html.fromstring(page.content) | |
nursing_facility_name = virginia_nursing_facility_names[nursing_facility_count] | |
print("nursing facility name: ", nursing_facility_name) | |
div_wrapper = tree.xpath('//div[@id="General"]/div[@class="row"]/div[@class="col-md-4"][2]/text()') | |
nursing_facility_count += 1 | |
scrape_uris(virginia_nursing_facility_uris, virginia_nursing_facility_names, nursing_facility_count) |
Author
jalbertbowden
commented
Apr 5, 2020
i've tried encode.('utf-8).strip()
from this so answer: https://stackoverflow.com/questions/22216076/unicodedecodeerror-utf8-codec-cant-decode-byte-0xa5-in-position-0-invalid-s but it didn't work. maybe i did it wrong. i also swapped out the &
for &
but that didn't work either.
tree = html.fromstring(page.content.decode('utf-8', 'ignore')) is the answer via jrsmith
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment