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

Any script or imacros that can do this.

Discussion in 'Black Hat SEO' started by Ayomav, Dec 27, 2011.

  1. Ayomav

    Ayomav Regular Member

    Joined:
    Nov 23, 2011
    Messages:
    250
    Likes Received:
    19
    Hello,

    I have list of links, these links redirect to some other site.I have list of links in column A in csv file, I want the script to generate list of links that it redirects to in column B.

    Anyone knows any script or imacros that can do this or anyone willing to create and share in this thread ? Thanks and rep will be given.

    Thanks
     
  2. Addicted

    Addicted Regular Member

    Joined:
    Nov 6, 2011
    Messages:
    438
    Likes Received:
    445
    Occupation:
    HELL GATEKEEPER
    Location:
    HEAVEN-server
    i dont think it can be done by script..

    but if someone know much appreciated
     
  3. weedsmoker

    weedsmoker Junior Member

    Joined:
    May 2, 2011
    Messages:
    190
    Likes Received:
    79
    OK, you need final url after redirection, right? If this is the case try this python script:
    Code:
    import urllib2
    
    links = '''http://www.watchfreemovies.ch/external.html?title=Game+of+Thrones&url=aHR0cDovL3d3dy5ub3ZhbW92LmNvbS92aWRlby9hMnBrZmExdG00ZTg5&domain=bm92YW1vdi5jb20=&loggedin=0
    http://www.watchfreemovies.ch/external.html?title=Game+of+Thrones&url=aHR0cDovL3d3dy52aWRlb3dlZWQuZXMvZmlsZS80ZGQwYTUxZDIwNmIz&domain=dmlkZW93ZWVkLmVz&loggedin=0'''
    
    for link in links.split('\n'):
        try:
            req = urllib2.urlopen(link)
            print(req.geturl())
        except:
            pass
    Download Pyscripter portable, paste your code in new file and click run, in bottom window you'll get results. Now replace those 2 links with yours (1 link per line).
     
    • Thanks Thanks x 1
  4. Ayomav

    Ayomav Regular Member

    Joined:
    Nov 23, 2011
    Messages:
    250
    Likes Received:
    19
    I couldn't run the Pyscripter portable, u have script in imacros or an executable software.

    Thanks
     
  5. weedsmoker

    weedsmoker Junior Member

    Joined:
    May 2, 2011
    Messages:
    190
    Likes Received:
    79
    I don't know if it is possible doing it with imacros, building executable is troublesome, this is the fastest way. Downloads from Softpedia won't work.
    Download it from
    Code:
    http://ftp.osuosl.org/pub/portablepython/v2.7/PortablePython_2.7.2.1.exe
    extract it, paste the code, replace with your links and press play button (Run)
     
    • Thanks Thanks x 1
    Last edited: Dec 27, 2011
  6. Ayomav

    Ayomav Regular Member

    Joined:
    Nov 23, 2011
    Messages:
    250
    Likes Received:
    19
    Thanks alot, it works.
     
  7. weedsmoker

    weedsmoker Junior Member

    Joined:
    May 2, 2011
    Messages:
    190
    Likes Received:
    79
    I've forgot one thing, if you want to compare redirect urls with final urls in spreadsheet, replace "pass" command with print('\n'). So, if fetching final url fails, script will print empty line.
     
    • Thanks Thanks x 1
  8. Ayomav

    Ayomav Regular Member

    Joined:
    Nov 23, 2011
    Messages:
    250
    Likes Received:
    19
    Thanks alot
     
  9. Ayomav

    Ayomav Regular Member

    Joined:
    Nov 23, 2011
    Messages:
    250
    Likes Received:
    19
    Hey, thanks alot for your help, I still have 1 problem.First, before I edit the pass command, I enter 1k urls and it gives out 9xx urls, I needed the lines to be correspondance so there was a problem.Now, after you give me the new solution, I enter 1k urls and it's giving out 1,053 lines, an extra of 53 lines.So, it's still giving me the same problem.You know any way to fix this problem ?

    Thanks
     
  10. Ayomav

    Ayomav Regular Member

    Joined:
    Nov 23, 2011
    Messages:
    250
    Likes Received:
    19
    Can anyone fix the code so it gives out urls line for line that will be correspondence with the input urls.

    Thanks and rep will be given.