How to split CSV data with newline, commas, quotes in the column of data? [closed]

I want to split the data line by line, but I am receiving newline and quotes in the data which is not allowing me that to split it by either newline.

CSV Data Received:

ISSUE ID,FACTOR NAME,ISSUE TYPE TITLE,ISSUE TYPE CODE,ISSUE TYPE SEVERITY,ISSUE RECOMMENDATION,FIRST SEEN,LAST SEEN,IP ADDRESSES,HOSTNAME,SUBDOMAIN,TARGET,PORTS,STATUS,CVE,DESCRIPTION,TIME SINCE PUBLISHED,TIME OPEN SINCE PUBLISHED,COOKIE NAME,DATA,COMMON NAME,KEY LENGTH,USING RC4?,ISSUER ORGANIZATION NAME,PROVIDER,DETECTED SERVICE,PRODUCT,VERSION,PLATFORM,BROWSER,DESTINATION IPS,MALWARE FAMILY,MALWARE TYPE,DETECTION METHOD,LABEL,INITIAL URL,FINAL URL,REQUEST CHAIN,HEADERS,ANALYSIS,% OF SIMILAR COMPANIES WITH THE ISSUE,AVERAGE FINDINGS (similar companies),ISSUE TYPE SCORE IMPACT
082a3553-6be8-5db0-a7a1-b7b7c75e48da,Dns Health,SPF Record Missing,spf_record_missing,MEDIUM,**"'- Create an SPF record for your domain that specifies authorized sending servers.
'- Implement strict DMARC (Domain'-based Message Authentication, Reporting, and Conformance) policies to enforce email authentication and protect against spoofing.
'- Consider implementing additional email security measures such as DKIM (DomainKeys Identified Mail) and DMARC to enhance email authentication and protection.
'- Educate users about phishing threats and encourage vigilance when handling suspicious emails.
'- Regularly review and update the SPF record to reflect changes in your email infrastructure.
"**,04/30/2021,07/14/2024,,redacted.com,,,,active,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0.93
9f995a7e-22fe-5b71-ba5c-75d6f1c3ee2b,Network Security,HTTP Proxy Service Detected,service_http_proxy,MEDIUM,"'- Employ encryption protocols, such as HTTPS, to secure data transmitted among the user, proxy, and destination servers.
'- Implement strong authentication mechanisms to control access to the proxy server and prevent unauthorized use.
'- Ensure the proxy server is properly configured to follow security best practices and restrict unnecessary access points.
'- Monitor and log proxy server activity to promptly detect any unusual or suspicious behavior.
'- Regularly update and patch the proxy server software to address potential security vulnerabilities.
'- Conduct security audits and assessments to identify and address potential weaknesses in the proxy configuration.
",07/14/2024,07/14/2024,52.223.21.170,,,,443,active,,,,,,"HTTP/1.1 404 Not Foundrndate: Sun, 14 Jul 2024 06:58:52 GMTrncontent-type: text/htmlrncontent-length: 60rnstrict-transport-security: max-age=31536000; includeSubDomainsrnx-amzn-trace-id: Root=1-6693772c-27c374ac8cf9560a3b2fd5bfrnx-content-type-options: nosniffrnconnection: closernrn<span>The page you're looking for could not be found.</span>",,,,,,,,,,,,,,,,,,,,,,,0.90```
ISSUE ID    FACTOR NAME ISSUE TYPE TITLE    ISSUE TYPE CODE ISSUE TYPE SEVERITY ISSUE RECOMMENDATION    FIRST SEEN  LAST SEEN   IP ADDRESSES    HOSTNAME    SUBDOMAIN   TARGET  PORTS   STATUS  CVE DESCRIPTION TIME SINCE PUBLISHED    TIME OPEN SINCE PUBLISHED   COOKIE NAME DATA    COMMON NAME KEY LENGTH  USING RC4?  ISSUER ORGANIZATION NAME    PROVIDER    DETECTED SERVICE    PRODUCT VERSION PLATFORM    BROWSER DESTINATION IPS MALWARE FAMILY  MALWARE TYPE    DETECTION METHOD    LABEL   INITIAL URL FINAL URL   REQUEST CHAIN   HEADERS ANALYSIS    % OF SIMILAR COMPANIES WITH THE ISSUE   AVERAGE FINDINGS (similar companies)    ISSUE TYPE SCORE IMPACT
082a3553-6be8-5db0-a7a1-b7b7c75e48da    Dns Health  SPF Record Missing  spf_record_missing  MEDIUM  "'- Create an SPF record for your domain that specifies authorized sending servers.
'- Implement strict DMARC (Domain'-based Message Authentication, Reporting, and Conformance) policies to enforce email authentication and protect against spoofing.
'- Consider implementing additional email security measures such as DKIM (DomainKeys Identified Mail) and DMARC to enhance email authentication and protection.
'- Educate users about phishing threats and encourage vigilance when handling suspicious emails.
'- Regularly review and update the SPF record to reflect changes in your email infrastructure.
"   4/30/2021   7/14/2024       redacted.com                active                                                                                                                  0.93
9f995a7e-22fe-5b71-ba5c-75d6f1c3ee2b    Network Security    HTTP Proxy Service Detected service_http_proxy  MEDIUM  "'- Employ encryption protocols, such as HTTPS, to secure data transmitted among the user, proxy, and destination servers.
'- Implement strong authentication mechanisms to control access to the proxy server and prevent unauthorized use.
'- Ensure the proxy server is properly configured to follow security best practices and restrict unnecessary access points.
'- Monitor and log proxy server activity to promptly detect any unusual or suspicious behavior.
'- Regularly update and patch the proxy server software to address potential security vulnerabilities.
'- Conduct security audits and assessments to identify and address potential weaknesses in the proxy configuration.
"   7/14/2024   7/14/2024   52.223.21.170               443 active                      HTTP/1.1 404 Not Foundrndate: Sun, 14 Jul 2024 06:58:52 GMTrncontent-type: text/htmlrncontent-length: 60rnstrict-transport-security: max-age=31536000; includeSubDomainsrnx-amzn-trace-id: Root=1-6693772c-27c374ac8cf9560a3b2fd5bfrnx-content-type-options: nosniffrnconnection: closernrn<span>The page you're looking for could not be found.</span>                                                                                           0.9

Issue Recommendation has quotes, newline characters in it which is not allowing me to split this line by line (as in text above).

Minimal Reproducible Example:

#Following is the "csv_data" value 

'''
ISSUE ID,FACTOR NAME,ISSUE TYPE TITLE,ISSUE TYPE CODE,ISSUE TYPE SEVERITY,ISSUE RECOMMENDATION,FIRST SEEN,LAST SEEN,IP ADDRESSES,HOSTNAME,SUBDOMAIN,TARGET,PORTS,STATUS,CVE,DESCRIPTION,TIME SINCE PUBLISHED,TIME OPEN SINCE PUBLISHED,COOKIE NAME,DATA,COMMON NAME,KEY LENGTH,USING RC4?,ISSUER ORGANIZATION NAME,PROVIDER,DETECTED SERVICE,PRODUCT,VERSION,PLATFORM,BROWSER,DESTINATION IPS,MALWARE FAMILY,MALWARE TYPE,DETECTION METHOD,LABEL,INITIAL URL,FINAL URL,REQUEST CHAIN,HEADERS,ANALYSIS,% OF SIMILAR COMPANIES WITH THE ISSUE,AVERAGE FINDINGS (similar companies),ISSUE TYPE SCORE IMPACT
082a3553-6be8-5db0-a7a1-b7b7c75e48da,Dns Health,SPF Record Missing,spf_record_missing,MEDIUM,"'- Create an SPF record for your domain that specifies authorized sending servers.
'- Implement strict DMARC (Domain'-based Message Authentication, Reporting, and Conformance) policies to enforce email authentication and protect against spoofing.
'- Consider implementing additional email security measures such as DKIM (DomainKeys Identified Mail) and DMARC to enhance email authentication and protection.
'- Educate users about phishing threats and encourage vigilance when handling suspicious emails.
'- Regularly review and update the SPF record to reflect changes in your email infrastructure.
",04/30/2021,07/14/2024,,redacted.com,,,,active,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0.93
9f995a7e-22fe-5b71-ba5c-75d6f1c3ee2b,Network Security,HTTP Proxy Service Detected,service_http_proxy,MEDIUM,"'- Employ encryption protocols, such as HTTPS, to secure data transmitted among the user, proxy, and destination servers.
'- Implement strong authentication mechanisms to control access to the proxy server and prevent unauthorized use.
'- Ensure the proxy server is properly configured to follow security best practices and restrict unnecessary access points.
'- Monitor and log proxy server activity to promptly detect any unusual or suspicious behavior.
'- Regularly update and patch the proxy server software to address potential security vulnerabilities.
'- Conduct security audits and assessments to identify and address potential weaknesses in the proxy configuration.
",07/14/2024,07/14/2024,52.223.21.170,,,,443,active,,,,,,"HTTP/1.1 404 Not Foundrndate: Sun, 14 Jul 2024 06:58:52 GMTrncontent-type: text/htmlrncontent-length: 60rnstrict-transport-security: max-age=31536000; includeSubDomainsrnx-amzn-trace-id: Root=1-6693772c-27c374ac8cf9560a3b2fd5bfrnx-content-type-options: nosniffrnconnection: closernrn<span>The page you're looking for could not be found.</span>",,,,,,,,,,,,,,,,,,,,,,,0.90

'''

records = []

for record in csv_data.split("n"):
    r_split = record.split(",")
    records.append({
        "domain": r_split[0],
        "status": r_split[1],
        "issues": r_split[2],
        "findings": r_split[3],
        "scoreImpact": r_split[4],
        "ipscount": r_split[5],
        "criticality": r_split[6],
        "tags": r_split[7]
    })

New contributor

Aditya is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

4

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật