1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Anyone of know of a program that can do this?

Discussion in 'Black Hat SEO Tools' started by Checkmate, Jun 24, 2016.

  1. Checkmate

    Checkmate BANNED BANNED

    Joined:
    Aug 9, 2010
    Messages:
    1,659
    Likes Received:
    682
    I have a long list of URLs that are in this format:

    http://url.com/intry.php?c=439243&location=3943894

    I want to strip out everything after intry.php?c=439243, basically removing the &location=3943894 portion.

    Anyone know of a list tool or something that can do this?
     
  2. immaletyoufinish

    immaletyoufinish Regular Member

    Joined:
    Mar 3, 2016
    Messages:
    219
    Likes Received:
    113
    Yeah man Linux command line is built for this. If all the urls are in a file called url.txt the you can do:

    cat url.txt | sed 's/&.*//' > stripped_urls.txt

    cat command outputs the contents of the file line by line and we pipe that into 'sed' which is a 'stream editor' and edit each line on the fly replacing the '&' symbol and everything after it with nothing and then saving the result in a new file called stripped_urls.txt
     
    • Thanks Thanks x 1
  3. lovejesus

    lovejesus Regular Member

    Joined:
    Jul 28, 2013
    Messages:
    200
    Likes Received:
    25
    Occupation:
    Freelancer
    Location:
    UK
    Through php function you can .
     
    • Thanks Thanks x 1
  4. jadsn

    jadsn Regular Member

    Joined:
    Jul 29, 2008
    Messages:
    360
    Likes Received:
    117
    You can do this in excel using a wildcard (*).

    Select the column with your list and press Ctl + H

    Under "Find what" put "?c=*" (without quotes)
    Under "Replace with" put nothing (leave it blank)

    Press replace all, and you're set.
     
    • Thanks Thanks x 2
  5. Bahmer

    Bahmer Regular Member

    Joined:
    Jul 8, 2015
    Messages:
    261
    Likes Received:
    60
    You can do this super easily using scrapebox I think- just trim everything after the mask you specify.
     
  6. Checkmate

    Checkmate BANNED BANNED

    Joined:
    Aug 9, 2010
    Messages:
    1,659
    Likes Received:
    682
    It can only strip down the root of the domain name, first thing I tried. :confused:
     
  7. buzz

    buzz BANNED BANNED

    Joined:
    May 19, 2016
    Messages:
    201
    Likes Received:
    52
    Gender:
    Male
    I could create you an easy PHP script which can do this for an unlimited number of links for $50. Please send me a PM if you are interested.
     
  8. cloaking

    cloaking Registered Member

    Joined:
    Aug 21, 2015
    Messages:
    94
    Likes Received:
    31
    Here's a quick PHP version (for free ;)):

    PHP:
    $urls explode(PHP_EOL,file_get_contents("urls.txt"));

    foreach (
    $urls as $url) {
       
    $url=substr($url0strrpos($url'&'));
       
    file_put_contents("new_urls.txt",$url."\r\n",FILE_APPEND);
    }
    Notes:
    • Put all of your URLs in a file called "urls.txt"
    • Save the above code to a PHP file in the same directory
    • It will output the new URLs to "new_urls.txt"
     
    • Thanks Thanks x 1
  9. Joseph Lich

    Joseph Lich BANNED BANNED

    Joined:
    Nov 25, 2015
    Messages:
    402
    Likes Received:
    79
    javascript indexOf()