Encoding error handling in expandlinks
This commit is contained in:
parent
4e683308ac
commit
6f592eddb2
1 changed files with 5 additions and 1 deletions
|
|
@ -57,7 +57,11 @@ CSV.open(ARGV[1], 'wb') do |out|
|
|||
newlink = follow_url(link)
|
||||
if (newlink!=link)
|
||||
# puts "#{link} --> #{newlink}"
|
||||
tweet.gsub!(link, newlink)
|
||||
begin
|
||||
tweet.gsub!(link, newlink)
|
||||
rescue
|
||||
puts "Encoding fsckup in #{newlink}"
|
||||
end
|
||||
end
|
||||
}
|
||||
row[3] = tweet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue