Hello,
I have list of links, these links redirect to some other site.I have list ...
-
Any script or imacros that can do this.
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
-
-
-
Re: Any script or imacros that can do this.
i dont think it can be done by script..
but if someone know much appreciated
<<=========I-N-D-I-A=============>>
-
-
Re: Any script or imacros that can do this.
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).
-
The Following User Says Thank You to weedsmoker For This Useful Post:
-
Re: Any script or imacros that can do this.

Originally Posted by
weedsmoker
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).
I couldn't run the Pyscripter portable, u have script in imacros or an executable software.
Thanks
-
-
Re: Any script or imacros that can do this.
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)
Last edited by weedsmoker; 12-27-2011 at 11:37 AM.
-
The Following User Says Thank You to weedsmoker For This Useful Post:
-
Re: Any script or imacros that can do this.

Originally Posted by
weedsmoker
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 alot, it works.
-
-
Re: Any script or imacros that can do this.
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.
-
The Following User Says Thank You to weedsmoker For This Useful Post:
-
Re: Any script or imacros that can do this.

Originally Posted by
weedsmoker
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 alot
-
-
Re: Any script or imacros that can do this.

Originally Posted by
weedsmoker
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.
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
-
-
Re: Any script or imacros that can do this.
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.
-
Similar Threads
-
By owilliams in forum HTML & JavaScript
Replies: 1
Last Post: 12-10-2011, 12:08 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks