cancel
Showing results for 
Search instead for 
Did you mean: 

Execute python using Script/Execute script snap

Siva_Venna
Contributor

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-Medic...
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’])

4 REPLIES 4

Siva_Venna
Contributor

Can someone shed some some light on this query? Thanks.

ashlam
New Contributor

Hi,Have you got solution for this…?

Siva_Venna
Contributor

I have implemented this by hard coding the link in the snap. excluded this python script

Thank you for the quick reply.I appreciate it.