projects
/
pompage.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-svn-id: svn://euphorik.ch/pompage@48 02bbb61a-6d21-0410-aba0-cb053bdfd66a
[pompage.git]
/
src
/
modules
/
allocine.rb
diff --git
a/src/modules/allocine.rb
b/src/modules/allocine.rb
index
01764f8
..
7f232f2
100644
(file)
--- a/
src/modules/allocine.rb
+++ b/
src/modules/allocine.rb
@@
-91,6
+91,7
@@
class Allocine < Basemodule
/<img src="(.*?)" border="0" alt="" class="affichette" \/>/ =~ html
\r
unless $1.nil?
\r
@threadImage = Thread::start($1){|imageUrl|
\r
/<img src="(.*?)" border="0" alt="" class="affichette" \/>/ =~ html
\r
unless $1.nil?
\r
@threadImage = Thread::start($1){|imageUrl|
\r
+ nbRetry = 0
\r
begin
\r
imageUrl = URI.parse(imageUrl)
\r
connexionImage = Net::HTTP::new(imageUrl.host).start
\r
begin
\r
imageUrl = URI.parse(imageUrl)
\r
connexionImage = Net::HTTP::new(imageUrl.host).start
\r
@@
-102,8
+103,8
@@
class Allocine < Basemodule
rescue Exception => e
\r
puts e.message
\r
puts e.backtrace
\r
rescue Exception => e
\r
puts e.message
\r
puts e.backtrace
\r
- puts "[!] Erreur lors du chargement de l'image
#{imageUrl}
, retry.."
\r
- retry
\r
+ puts "[!] Erreur lors du chargement de l'image
'#{imageUrl}'
, retry.."
\r
+ retry
if (nbRetry += 1) < 5
\r
end
\r
}
\r
end
\r
end
\r
}
\r
end
\r