How to resolve URL redirects?
问题 I have a txt document with many short urls.Each url is seperated by a single line.I want to resolve the URLs to get the final link.Also some URLs are redirected twice.How to automate this to get the final urls with output format of one url per line? Update: Input text file: http://www.example.com/go/post-page-1 http://www.example.com/go/post-page-2 http://www.example.com/go/post-page-3 Output format needed in txt file: http://www.example.org/post-page-name http://www.example.org/post-page