Skip to main content
Best answer

Can't import urllib.request and bs4 BeautifulSoup into zapier

  • March 15, 2021
  • 2 replies
  • 1101 views

I'm integrating zapier (to run python) to scrape latest reviews from www.tripadvisor.com at the https://www.tripadvisor.com/HotelsManagementCenter-g60982-d87016-c0-Hilton_Hawaiian_Village_Waikiki_Beach_Resort-Honolulu_Oahu_Hawaii.html

and populate to www.clickfunnel.com

Problem: For this job I tried importing urllib.request and bs4 BeautifulSoup but it seem no such modules installed with python.

The code is working perfect on my local system but on https://zapier.com/ throws the following error.

Error:

Traceback (most recent call last): File "", line 10, in the_function ModuleNotFoundError: No module named 'bs4'

Please suggest me a solution for this. Thanks in advance.

 

Please visit the link to code here

 

https://stackoverflow.com/q/66637592/4957925

Best answer by GetUWired

@tech_pierce 

Zapier does not support installing modules in the code block as it is a sandbox environment. 

You would need to explore building this step in the CLI builder or using webhooks to run it on your local maching and push results back into Zapier. 

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

GetUWired
Forum|alt.badge.img+12
  • Zapier Solution Partner
  • Answer
  • March 17, 2021

@tech_pierce 

Zapier does not support installing modules in the code block as it is a sandbox environment. 

You would need to explore building this step in the CLI builder or using webhooks to run it on your local maching and push results back into Zapier. 


  • New
  • August 7, 2023

Came across this useful wrapper API for Python’s Beautiful Soup BS4.

You can pass your HTML to the API, and call the popular BS4 methods and request for any params.

This should do the trick

https://rapidapi.com/dollarbill99/api/beautifulsoup-wrapper