Skip to content

Importing urls from CSV

edited November 2022 in GSA Website Contact
Dear Sven,
I am trying to import a list of URLs to an existing project.
I already imported a list of URLs from a regular txt file and it worked without a problem.
But I also want to import URLs from CSV file because i want to have a few other columns, so that each URL has a few more values that i can use in my messages in order to make each message more unique. As far as I know, this is not possible with a regular txt file. Am i correct?

But no matter what i do, the program simply does not import the CSV data correctly and no new URLs are being added to the URL list of the project.

And yes, I already know that "Also after import you will NOT see new columns in the site listing, but you see CSV Data details in a mouse over hint." but in my case no new rows (URLs) were added to the project at all!

Can you please explain EXACTLY WHERE in the program should i import the CSV file?
And what exact CSV file format should i use?
I tried CSV-UTF 8 and also CSV COMMA DELIMITED but none worked!
Do I have to save the CSV file in a special way in order to be able to import it into the program??

Many thanks,
Z

Comments

  • UPDATE: OK, I feagured out what was the problem.
    When I save to CSV with excel, the default saving will not wrap the values with " "
    And the program does not recognize the data in the CSV file.
    I found a way to wrap the values inside the csv file, it takes a little more time but not the end of the world.
    If the program could recognize CSV file with the default excel format that would be fantastic.
    Z
  • SvenSven www.GSA-Online.de
    please send me such a file and i have a look
  • edited November 2022
    I could not upload a csv file to this message because csv file type is not allowed. please write me your email address so i can send it directly there.
    By the way, you deserve A MILLION THANKS for adding the an option to make the GUI size larger, it's the first time I noticed this feature. Thank you thank you thank you for that. I struggle with this super small annoying fonts for a long time, but not anymore :)

    Is it possible to change the GUI size also with Search Engine Ranker? and what about the GUI size of captcha breaker?
  • SvenSven www.GSA-Online.de
    check pm
  • edited December 2022
    Dear Sven,
    I am trying to import a list of URLs to an existing project.
    I already imported a list of URLs from a regular txt file and it worked without a problem.
    But I also want to import URLs from CSV file because i want to have a few other columns, so that each URL has a few more values that i can use in my messages in order to make each message more unique. As far as I know, this is not possible with a regular txt file. Am i correct?

    But no matter what i do, the program simply does not import the CSV data correctly and no new URLs are being added to the URL list of the project.

    And yes, I already know that "Also after import you will NOT see new columns in the site listing, but you see CSV Data details in a mouse over hint." but in my case no new rows (URLs) were added to the project at all!

    Can you please explain EXACTLY WHERE in the program should i import the CSV file?
    And what exact CSV file format should i use?
    I tried CSV-UTF 8 and also CSV COMMA DELIMITED but none worked!
    Do I have to save the CSV file in a special way in order to be able to import it into the program??

    Many thanks,
    Z
    Can you share the file? or screenshot, might be able to assess the problem.
  • Natasha78Natasha78 india
    edited May 2023

    To import URLs from a CSV file, you can use Python's built-in csv module and requests module. Here's an example code that reads a CSV file and makes a GET request to each URL listed in the file

    python
    import csv
    import requests
    
    # open the CSV file
    with open('urls.csv', 'r') as csvfile:
        reader = csv.reader(csvfile)
        # iterate over each row in the CSV file
        for row in reader:
            # the URL is the first column in the row
            url = row[0]
            # make a GET request to the URL
            response = requests.get(url)
            # print the status code of the response
            print(f"{url}: {response.status_code}")
    

    In this example, assume that urls.csv is a CSV file that contains a list of URLs in the first column. The csv.reader method is used to read the file, and the requests.get method is used to make a GET request to each URL. The status code of each response is printed to the console.  B)





Sign In or Register to comment.