The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Moz Tools
    4. Are the CSV downloads malformatted, when a comma appears in a URL?

    Are the CSV downloads malformatted, when a comma appears in a URL?

    Moz Tools
    3 2 322
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Safelincs
      Safelincs last edited by

      Howdy folks, we've been a PRO member for about 24 hours now and I have to say we're loving it! One problem I am having with however is a CSV exported from our crawl diagnostics summary that I've downloaded.

      The CSV contains all the data fine, however I am having problems with it when a URL contains a comma. I am making a little tool to work with the CSVs we download and I can't parse it properly because there sometimes URLs contain commas and aren't quoted the same as other fields, such as meta_description_tag, are.

      Is there something simple I'm missing or is it something that can be fixed?

      Looking forward to learn more about the various tools. Thanks for the help.

      1 Reply Last reply Reply Quote 0
      • loopyal
        loopyal last edited by

        The first rule in this business is "You can't trust programmers"

        I should know, I am a programmer and I used to manage teams of them.

        You can't trust them to write something perfect, because they will always make huge assumptions, based on what they know.

        They should know that URLs can contain commas, and they should quote them.

        If they didn't do that in the final field, it is a deficiency in the code and your stuff isn't going to workunless you fix it manually.

        What you need to do to fix this is to add a quote after the 10th comma and also add one at the end of each line.

        Unfortunately, even that is a problem.

        The problem is there are other fields that may not be quoted, some of which can start with http://

        There can also be line breaks in the title field, and possibly even in the link text field.

        Quotes and other characters are escaped with double quotes.

        Titles and link text can also contain commas, so it is very complex.

        Some of the fields are a bigger mess because it depends on the link text, and if the link text contains an image, you'll have quotes and equals signs, commas and all kinds of stuff. You can also have upper ascii characters and multibyte characters.

        They did actually quote the first URL, if it contains commas.

        They really should have quoted every field

        Safelincs 1 Reply Last reply Reply Quote 1
        • Safelincs
          Safelincs @loopyal last edited by

          I won't be too hard on the programmers - I'm a programmer myself. Our small business has developers and designers doing the bulk of the SEO. I can see you've looked in to it as I have - there are many factors involved if I was to decide to "fix" this myself. To be honest, I don't fancy it - I'm hoping the better approach will come from the wonderful SEO Moz developers who might put in a fix. Hint hint.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Can you help by advising how to stop a URL from referring to another URL on my website with a 404 errorplease?
            0
            2
            16

          • Difference between urls and referring urls?
            Andrew-SEO
            Andrew-SEO
            1
            3
            703

          • Duplicate content issues with file download links (diff. versions of a downloadable application)
            Tenlo
            Tenlo
            0
            2
            66

          • Why am I not getting my allowance of 10,000 inbound links in csv download file? 370 out of 4700??
            Christy-Correll
            Christy-Correll
            0
            5
            175

          • The keyword ranking report takes into account all my website urls? Can I specify the URLs where I want to track the keywords?
            KeriMorgret
            KeriMorgret
            0
            3
            257

          • In Site Explorer My Blog.URL.com Shows "No Data Available for this URL"
            bradkrussell
            bradkrussell
            0
            4
            735

          • Handling long URLs and overly-dynamic URLs on eCommerce site
            RockettInteractive
            RockettInteractive
            0
            7
            3.0k

          • How do I get the Page Authority of individual URLs in my exported (CSV) crawl reports?
            Twilio
            Twilio
            0
            3
            740

          Get started with Moz Pro!

          Unlock the power of advanced SEO tools and data-driven insights.

          Start my free trial
          Products
          • Moz Pro
          • Moz Local
          • Moz API
          • Moz Data
          • STAT
          • Product Updates
          Moz Solutions
          • SMB Solutions
          • Agency Solutions
          • Enterprise Solutions
          • Digital Marketers
          Free SEO Tools
          • Domain Authority Checker
          • Link Explorer
          • Keyword Explorer
          • Competitive Research
          • Brand Authority Checker
          • Local Citation Checker
          • MozBar Extension
          • MozCast
          Resources
          • Blog
          • SEO Learning Center
          • Help Hub
          • Beginner's Guide to SEO
          • How-to Guides
          • Moz Academy
          • API Docs
          About Moz
          • About
          • Team
          • Careers
          • Contact
          Why Moz
          • Case Studies
          • Testimonials
          Get Involved
          • Become an Affiliate
          • MozCon
          • Webinars
          • Practical Marketer Series
          • MozPod
          Connect with us

          Contact the Help team

          Join our newsletter
          Moz logo
          © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
          • Accessibility
          • Terms of Use
          • Privacy