<div class="readmore"> <a href="" onclick="updateDetailModal({name":"Company Name 1","website":"https:\/\/hello.com.sg\/","phone":"65 8123 4567","email":"hello@gmail.com.sg"})" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">More </a> </div>
Hi I'm looking to web scrape the following so that I can get it in a .csv file in this format<br>
Company Name | Website Url | Phone | Email -> 1st Row
Company Name 1 | https://hello.com.sg/ | 81234567 | hello@gmail.com -> 2nd Row
Company Name 2 | https://hello2.com.sg/ | 87654321 | hello2@gmail.com -> Subsequent rows for all links
Is there a way to use regex to get the individual fields and export them to a CSV file? I've been trying python and beautiful soup but I only know how to export using class
or id
. Not sure how to do it for function parameters.
Appreciate your help!
https://stackoverflow.com/questions/67310656/webscraping-on-html-function-parameter-and-export-to-csv April 29, 2021 at 11:31AM
没有评论:
发表评论