Siva_Venna
7 years agoContributor
Execute python using Script/Execute script snap
I have below python code to pass script output to file reader snap. As script needs some libraries,are they supported by snaplogic? Please suggest how to execute this script.
Code:
#Import libraries
import requests
from bs4 import BeautifulSoup
import re
# Set the URL to webscrape from
url = ‘https://www.cms.gov/Medicare-Medicaid-Coordination/Medicare-and-Medicaid-Coordination/Medicare-Medicaid-Coordination-Office/Analytics.html’
response = requests.get(url)
soup = BeautifulSoup(response.text, “html.parser”)
all_links=soup.findAll(‘a’)
link=soup.find(‘a’, title=re.compile(‘MMEnrolleeStateandCountyEnrollmentSnapshotsQuarterly’))
file_name = (link[‘href’])