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

Remove bah from url ?

Discussion in 'Black Hat SEO Tools' started by lifco, Mar 24, 2011.

  1. lifco

    lifco Regular Member

    Joined:
    Apr 5, 2010
    Messages:
    206
    Likes Received:
    283
  2. xpleet

    xpleet Regular Member

    Joined:
    Jan 18, 2010
    Messages:
    377
    Likes Received:
    327
    Location:
    Morocco
    Replace "blah" using notpad or notpad++ with empty.
    You can also filter it with scrapebox.
     
  3. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    • Thanks Thanks x 1
  4. snoozebot

    snoozebot Regular Member

    Joined:
    Nov 1, 2010
    Messages:
    493
    Likes Received:
    497
    Occupation:
    Engineer
    Location:
    BHW
    I'd use Notepad and replace the '/bah' with nothing if I were you.
     
  5. GreyWolf

    GreyWolf Executive VIP Jr. VIP

    Joined:
    Aug 17, 2009
    Messages:
    1,930
    Likes Received:
    5,389
    Gender:
    Male
    Occupation:
    Artist / Craftsman
    Location:
    sitting at my PC
    since the /blah blah blah part won't be the same for every line, the search and replace in notepad won't help him. Unless he wants to just go through manually removing it line by line. I think he'd rather it be automated. :rolleyes:

    The PHP solution fatboy suggested is a better way. He can use the function to parse through the lines to find something like the third slash and remove everything after that till the next line and keep repeating the task for each line until the eof. The script can parse through the first file and write a new file with the data cleaned up in the way the OP wants it.


    :call2:
     
    • Thanks Thanks x 1
    Last edited: Mar 24, 2011
  6. RandomPhantom

    RandomPhantom Junior Member

    Joined:
    Nov 7, 2008
    Messages:
    124
    Likes Received:
    21
    Try CSVed

    Open it as a CSV-file, set the delimiter to " " (space) and delete column 2 and you're all set.
     
  7. snoozebot

    snoozebot Regular Member

    Joined:
    Nov 1, 2010
    Messages:
    493
    Likes Received:
    497
    Occupation:
    Engineer
    Location:
    BHW
    Ha..missed the blah blah part. I just saw the title (mentioning /bah) and the link that ends with /blog. I figured /bah = /blog. Didn't notice there's more after the /blog. Yeah using notepad in that case would be stupid. :eek::eek::eek:
     
  8. lifco

    lifco Regular Member

    Joined:
    Apr 5, 2010
    Messages:
    206
    Likes Received:
    283
    Thanks guys for the help, yer il give the php way a shot
     
  9. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    This should work:

    Code:
    <?php
    
            $urls = file('urls.txt');
            foreach($urls as $url)
            {
                    print "http://" . parse_url($url, PHP_URL_HOST) . "\n";
            }
    ?>
    
    Just put all your urls in urls.txt, one per line then run the script.


    ** EDIT **
    If you want the URLs in another file then do:
    Code:
    php scriptname.php > output.txt
    
     
    • Thanks Thanks x 1
    Last edited: Mar 24, 2011