from selenium import webdriver
import bs4
from selenium.webdriver.common.keys import Keys
import requests
browser=webdriver.Chrome()
browser.maximize_window()
sites=["http://www.audiodigest.org",
"http://www.projectsinknowledge.com",
"http://www.facs.org",
"http://www.clevelandclinicmeded.com",
"http://www.medscape.org",
"http://www.unmc.edu/cce",
"http://www.akhcme.com",
"https://www.relias.com/",
"http://ccehs.upmc.edu",
"http://www.cdc.gov",
"http://www.texashealth.org/cme",
"http://essentiahealth.org",
"http://www.arrs.org",
"http://louisville.edu/medschool",
"http://www.urmc.rochester.edu/cpe",
"http://www.ce.mayo.edu",
"http://www.mecme.org",
"http://www.med-iq.com",
"http://www.bucme.org",
"https://www.bswhealth.med/cme",
"https://vumc.cloud-cme.com",
"http://www.cme.northwestern.edu",
"http://www.CECentral.com",
"http://www.HopkinsCME.edu",
"http://www.acep.org",
"http://micme.medicine.umich.edu",
"http://www.med.navy.mil/sites/navmedmpte/cme/Pages/default.aspx",
"httpS://EDUCATION.MODS.ARMY.MIL/CME/SECURED",
"http://www.globaleducationgroup.com",
"http://www.uab.edu/cme",
"http://cme.wustl.edu",
"http://www.tmlt.org",
"http://www.pri-med.com",
"http://www.aao.org",
"https://aasm.org/",
"http://www.naccme.com",
"http://www.acponline.org",
"http://www.acc.org",
"https://www.rushu.rush.edu/education-and-training/continuing-and-professional-studies/interprofessional-continuing-education",
"http://www.beaumont.edu",
"http://www.cme.hms.harvard.edu",
"http://cme.lww.com",
"https://ce.icep.wisc.edu/",
"http://www.massmed.org",
"http://airforcemedicine.afms.mil/afphysiciancme",
"http://www.cme.ufl.edu",
"http://www.acr.org",
"http://www.annenberg.net",
"http://ce.pharmacy.purdue.edu/",
"https://upenn.cloud-cme.com",
"http://www.meded.uci.edu/CME",
"https://uc.cloud-cme.com",
"http://www.elseviercme.com",
"http://ccme.osu.edu",
"http://ce.med.psu.edu",
"http://www.asahq.org",
"http://www.aap.org",
"http://www.rsna.org",
"http://www.sharp.com",
"http://www.teamhealth.com",
"http://www.rutgers.edu",
"http://www.proassurance.com",
"http://www.psych.org",
"http://www.cap.org",
"http://www.gastro.org",
"http://www.cme.ucsd.edu",
"http://www.jointcommission.org",
"http://www.advocatehealth.com",
"http://www.mdanderson.org",
"http://www.parknicollet.com/cme",
"http://www.baptisthealth.net",
"http://med.dartmouth-hitchcock.org/ce.html",
"http://www.mcw.edu/",
"http://www.albany.edu/sph/coned/index.htm",
"https://med.und.edu/continuing-medical-education/index.html",
"http://www.physicianleaders.org",
"http://www.cmepartner.org",
"http://casemed.case.edu/cme",
"http://www.researchtopractice.com",
"http://www.pediatrixu.com",
"http://www.aaaai.org",
"http://www.gcus.com",
"https://ja.dh.duke.edu",
"http://www.nationwidechildrens.org",
"http://www.med.utah.edu/som/education/cme",
"http://www.potomacme.org",
"http://www.aaos.org",
"http://www.ceme.org",
"http://www.vindicomeded.com",
"http://www.medicine.uiowa.edu/cme",
"http://www.oakstone.com",
"http://www.continuingeducation.com",
"http://cme.uchicago.edu",
"http://health.usf.edu",
"http://www.uscap.org",
"http://www.acog.org",
"http://www.asrm.org",
"http://www.mssm.edu/cme",
"http://www.asco.org",
"http://www.edusymp.com",
"http://cme.ucsf.edu",
"http://www.dannemiller.com",
"http://www.abqaurp.org",
"http://medicine.tufts.edu/Education/Continuing-Education",
"http://www.plasticsurgery.org",
"http://www.entnet.org",
"http://www.pedsuniversity.org",
"http://www.francefoundation.com",
"http://www.legacyhealth.org/for-health-professionals/education-for-health-professionals/continuing-medical-education.aspx",
"http://www.cns.org",
"http://www.umassmed.edu/cme",
"http://www.texmed.org",
"http://www.vizientinc.com",
"http://www.schumacherclinical.com",
"http://www.camcinstitute.org",
"http://www.neiglobal.com",
"http://nyulmc.org/cme",
"http://www.cme.arizona.edu",
"http://www.gotoper.com",
"http://www.lammico.com",
"http://www.ohsu.edu/som/cme",
"http://medschool.slu.edu/cme",
"http://achlCME.org",
"http://www.mssny.org",
"http://rmf.harvard.edu",
"http://www.bostonchildrens.org",
"http://www.hss.edu/",
"http://www.cmevillage.com",
"http://www.obesitymedicine.org",
"http://thesullivangroup.com",
"http://www.geisinger.org",
"http://www.amc.edu",
"http://www.jbjs.org",
"http://cme@queens.org",
"http://medicine.buffalo.edu",
"http://www.childrensmercy.org",
"http://www.northwell.edu",
"http://www.mlicme.org/",
"http://www.mcleanhospital.org",
"http://www.psychiatrist.com",
"http://www.cmeoutfitters.com",
"http://www.iame.com",
"http://www.aanem.org",
"http://learn.heart.org",
"http://www.namcp.org",
"http://www.thoracic.org",
"http://www.cms.gov",
"http://www.childrensomaha.org",
"http://www.nextgen.com",
"http://www.utsouthwestern.edu",
"http://www.sto-online.org",
"http://www.uhms.org",
"http://cme.vcuhealth.org",
"https://www.sanfordhealth.org",
"http://www.csmc.edu",
"http://www.prochoice.org",
"http://www.snmmi.org",
"https://cme.med.wayne.edu/",
"http://www.ascp.org",
"http://www.musc.edu/cme",
"http://www.smhs.gwu.edu/cehp",
"http://www.unthsc.edu",
"http://jeffline.tju.edu/jeffcme",
"http://www.hartfordhealthcare.org",
"http://www.cme.umn.edu",
"http://www.thecarlatreport.com/",
"http://www.wileyhealthlearning.com",
"http://cme.ucdavis.edu",
"http://www.CCMAHealth.org",
"http://www.swedish.org/cme",
"http://cme.yale.edu",
"http://brown.edu/cme",
"http://www.sportsmed.org",
"http://www.ColumbiaCME.org",
"http://www.dmu.edu",
"http://www.ebmedicine.net",
"http://www.emory.edu/CME",
"http://www.aaoms.org",
"http://www.asge.org",
"http://www.wakehealth.edu",
"http://www.asam.org",
"http://www.prescribersletter.com",
"http://www.auanet.org",
"https://www.optumhealtheducation.com",
"http://www.medicaled.com",
"http://www.imedex.com",
"http://www.chestnet.org",
"http://www.mecop.org",
"http://www.iahb.org",
"http://humanmedicine.msu.edu",
"http://www.inmed.us",
"http://www.cytopathology.org",
"http://www.antidotecme.com",
"http://www.ce.wvu.edu",
"http://csam-asam.org",
"http://www.coh.org",
"http://www.medicine.uic.edu",
"http://www.mskcc.org",
"http://www.cmeconsultants.com",
"http://www.weinsuredocs.com",
"http://www.ecri.org",
"http://www.apogeephysicians.com",
"http://www.utcomchatt.org/cme",
"http://www.SIRweb.org",
"http://www.cme.ucla.edu",
"http://www.nutritioncare.org",
"http://www.opusmedicus.com",
"http://www.allina.com",
"http://www.proscan.com",
"http://www.stjude.org",
"http://www.scientiaCME.org",
"http://www.naceonline.com",
"http://medicine.wright.edu/continuing-medical-education",
"http://www.kp.org",
"http://www.lowellgeneral.org",
"http://www.aabb.org",
"http://www.njhealth.org",
"http://www.norcal-group.com",
"http://www.scripps.org/conferenceservices",
"http://www.astro.org",
"http://tulane.edu/cce",
"http://www.cme.med.miami.edu",
"http://www.aafp.org",
"http://www.iars.org",
"http://www.medschool.ucdenver.edu/cme",
"http://www.ucaoa.org",
"http://www.nhpco.org",
"http://www.phlebology.org/",
"http://www.healthstream.com",
"http://www.ashp.org",
"http://www.ihi.org",
"http://www.pesi.com",
"http://www.bcm.edu/cme",
"http://www.ama-assn.org",
"http://www.endocrine.org",
"http://www.upstate.edu/cme",
"http://cme.stanford.edu",
"http://cme.utoledo.edu",
"http://usccme.usc.edu",
"http://www.stdavids.com",
"http://www.novanthealth.org/",
"http://www.primarycarenetwork.org",
"http://www.aans.org",
"http://www.gi.org",
"http://www.medrisk.com",
"http://www.asecho.org",
"http://www.med.unc.edu/cme",
"http://www.flmedical.org",
"https://www.ttuhsc.edu/medicine/continuing-medical-education/",
"http://www.fascrs.org",
"http://www.chop.edu/cme",
"http://www.aapmr.org",
"http://www.concussionmanagement.com",
"http://www.evolvemeded.com",
"http://www.mnmed.org",
"http://www.ascrs.org",
"http://www.hcpro.com",
"https://www.callcopic.com/Pages/default.aspx",
"http://www.pamedsoc.org",
"http://www.siumed.edu/cpd",
"http://www.acaai.org",
"http://www.stonybrook.edu/sb/medical.shtml",
"http://www.spine.org",
"http://www.paradigmmc.com",
"http://www.haymarketmedicaleducation.com/",
"http://sma.org",
"http://www.ipmameded.org",
"http://www.FCMcme.org",
"http://www.asmbs.org",
"http://towerhealth.org",
"http://www.wsma.org",
"http://www.painmed.org",
"http://www.acoem.org",
"http://www.behavioraltech.org",
"http://www.contemporaryforums.com",
"http://www.drexelmed.edu/cme",
"http://www.aagl.org",
"http://www.iafp.com",
"http://www.aace.com",
"http://www.ceconcepts.com",
"http://www.isms.org",
"http://www.omnia-prova.com/",
"http://www.mass.gov/dph",
"http://www.temple.edu/CME",
"http://www.AmericanMedicalSeminars.com",
"http://www.hospitalmedicine.org",
"http://www.healthonecares.com/for-physicians/online-cme/",
"http://www.medicalsocietyofdelaware.org",
"http://www.breastsurgeons.org",
"http://www.perinatalweb.org",
"http://www.medstudy.com",
"http://www.ncqa.org",
"http://www.EMedHome.com",
"http://www.nicabm.com",
"https://www.amitahealth.org/",
"http://www.memorialcare.org",
"http://www.seahec.net",
"http://www.msms.org",
"http://www.studergroup.com",
"http://www.psoriasis.org/",
"http://ssmhc.com",
"http://www.njafp.org",
"http://www.osler.org",
"http://www.lahey.org",
"http://www.stjosephs-phx.org/index.htm",
"http://www.aaem.org",
"http://www.rheumatology.org",
"http://www.assh.org",
"http://www.cmesolutions.org",
"http://www.nghs.com",
"http://www.WesternConnecticutHealthNetwork.org",
"http://www.sages.org",
"http://www.movementdisorders.org/",
"http://www.asnc.org",
"http://orlandohealth.com",
"http://www.nfid.org",
"http://www.nyee.edu",
"http://www.acha.org",
"http://www.vascularweb.org",
"https://www.steward.org/",
"http://cohri.com",
"https://nexusipe.org/",
"http://www.paltc.org",
"http://www.illinoisaap.org",
"http://www.medchi.org",
"http://PresenceHealth.org",
"http://www.cine-med.com",
"http://www.sentara.com",
"http://www.integrityce.com",
"http://cme.uchc.edu",
"http://www.naspghan.org",
"http://www.wisconsinmedicalsociety.org",
"http://www.ACCP1.org",
"http://www.athenahealth.com",
"http://www.aan.com",
"http://affinityced.com",
"http://www.emdocs.com",
"http://www.lipid.org",
"http://www.abcardio.org",
"http://www.lawandmed.com",
"http://www.guthrie.org",
"http://www.crouse.org",
"http://www.asn-online.org",
"http://www.aana.org",
"http://www.gahec.org",
"http://www.phyins.com",
"http://www.iscd.org",
"http://www.aacap.org",
"http://www.adena.org/meded",
"http://www.aahpm.org",
"http://www.healogics.com",
"http://www.mercynorthiowa.com",
"http://www.melrosewakefield.org",
"http://www.northmemorial.com",
"http://www.horizoncme.com",
"http://www.neomed.edu/officesanddirectory/facultyservices/continuing-professional-development",
"http://www.medicuscme.org",
"http://www.bidneedham.org",
"http://www.acmg.net",
"http://www.childrensmn.org",
"http://www.utahmed.org",
"http://www.amia.org",
"http://www.emlrc.org",
"http://www.womans.org",
"http://www.osma.org",
"http://lifespanlearn.org",
"http://www.alertpubs.com",
"http://www.sccm.org",
"http://slhduluth.com",
"http://www.unitedregional.org",
"http://www.roswellpark.org",
"http://www.mlmic.com",
"http://www.providence.org/swwa-cme",
"http://www.fsmb.org",
"http://www.synaptiv.org",
"http://www.cmic.biz",
"http://www.nebh.org",
"http://www.imq.org",
"http://www.worldclasscme.com",
"http://www.physiatry.org",
"http://www.theoma.org",
"http://www.prms.com",
"http://connecticutchildrens.org",
"http://www.jointsponsor.com",
"http://www.medpro.com",
"http://www.asccp.org",
"http://www.aasld.org",
"http://www.silvercross.org",
"http://www.scmr.org",
"http://knowledgetopractice.com",
"http://cme@suburbanhealth.com",
"http://www.ASTS.org",
"http://www.cms.org/",
"http://www.nicklauschildrens.org",
"http://www.ismanet.org",
"http://www.midcusa.com",
"http://www.americangeriatrics.org",
"http://www.hematology.org",
"http://www.seattlechildrens.org",
"http://www.aesnet.org",
"http://www.forefrontcollab.com",
"http://www.chomp.org",
"http://www.aclm.org",
"http://www.neuropath.org",
"http://www.socialsecurity.gov/",
"http://www.menopause.org",
"http://www.aofas.org",
"http://www.idsociety.org",
"http://informed.cme.edu/index.aspx",
"http://caiglobal.org",
"http://www.cosehc.org",
"http://www.curi.com",
"http://myana.org/",
"http://www.clinicaltools.com",
"https://cme.effsystems.com/",
"http://www.asnr.org",
"http://www.correctcareinc.com",
"http://www.psychiatry-mps.org",
"http://www.csahq.org",
"http://www.sts.org",
"http://www.fafp.org",
"http://www.peacehealth.org",
"http://www.CMEPlanet.com",
"http://www.peri.org",
"http://www.altru.org",
"http://coeh.berkeley.edu/ce",
"http://www.coordinatedhealth.com",
"http://www.srs.org/",
"http://www.siyemi.org",
"http://sleepfoundation.org/",
"http://www.fluorosafety.com",
"http://www.imne.com",
"http://www.scahq.org",
"http://pharmacy.uhh.hawaii.edu/",
"http://www.asdp.org",
"http://www.ProfessionalEd.joslin.org",
"http://www.oneblood.org/",
"http://www.aspho.org",
"http://www.sleepschool.com",
"http://www.pedsanesthesia.org",
"http://www.asrs.org",
"http://www.shea-online.org",
"http://www.acpsych.org",
"http://www.hemedicus.com",
"http://www.eapsa.org",
"http://www.ishrs.org",
"http://www.aacpdm.org",
"http://www.spponline.org",
"http://www.coa.org",
"http://www.perinatalresources.org",
"http://www.thoracicrad.org",
"http://www.CMEmeeting.org"]
worked=[]
failed=[]
for site in sites:
    try:
        site=browser.get(site)
    except:
        pass
    try:
        search=browser.find_element_by_xpath("//*[contains(@id, 'search')]")
        search.send_keys("Courses")
        search.send_keys(u'\ue007')
        worked.append(site)
    except:
        failed.append(site)
print(len(worked),len(failed))
