1 Reply Latest reply on Jul 9, 2019 9:59 AM by Nathan Mannheimer

    Tabpy Script : Bad Character when using quotation marks in script

    Roger Pouly

      Hello guys,


      I'm having trouble using a python script when there are quotation marks all other the place in my script. I keep getting Bad Character error.


      SCRIPT_STR(" from bs4 import BeautifulSoup page = requests.get('_arg1') soup = BeautifulSoup(page.content, 'html.parser') imageMiniature = soup.find_all(class_=lambda value: value and value.startswith("photo res")) imageMiniature = "".join(str(x) for x in imageMiniature) imageMiniature = imageMiniature.split("url('", 1)[-1] imageMiniature = imageMiniature.split("')", 1)[0] imageMiniature = imageMiniature.split("?w", 1)[0] imageMiniature_liste.append(imageMiniature) return(imageMiniature) ", FIELD )


      Main culprits here are the split function. Any idea how I can do this ?


      Thanks a lot,




      EDIT : For some reason the code above doesn't display correctly. Here it will be clearer :