allejest 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
6
+ *~
7
+ nbproject/private
8
+ *.gem
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Maciej Bilas
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,18 @@
1
+ = allejest
2
+
3
+ Description goes here.
4
+
5
+ == Note on Patches/Pull Requests
6
+
7
+ * Fork the project.
8
+ * Make your feature addition or bug fix.
9
+ * Add tests for it. This is important so I don't break it in a
10
+ future version unintentionally.
11
+ * Commit, do not mess with rakefile, version, or history.
12
+ (if you want to have your own version, that is fine but
13
+ bump version in a commit by itself I can ignore when I pull)
14
+ * Send me a pull request. Bonus points for topic branches.
15
+
16
+ == Copyright
17
+
18
+ Copyright (c) 2010 Maciej Bilas. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,56 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "allejest"
8
+ gem.summary = %Q{Powiadamia e-mailem o dostępności przedmiotów na allegro}
9
+ gem.description = %Q{Powiadamia e-mailem o dostępności przedmiotów na allegro.}
10
+ gem.email = "maciej@inszy.org"
11
+ gem.homepage = "http://github.com/maciej/allejest"
12
+ gem.authors = ["Maciej Bilas"]
13
+ gem.add_development_dependency "rspec"
14
+ gem.rubyforge_project = %q{allejest}
15
+
16
+ gem.add_dependency 'activesupport', '>=2.3.0'
17
+ gem.add_dependency 'feed_me', '>=0.6.0'
18
+ gem.add_dependency 'simply_useful', '>=0.1.6'
19
+ gem.add_dependency 'pony', '>=0.9'
20
+
21
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
22
+ end
23
+ rescue LoadError
24
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
25
+ end
26
+
27
+ require 'spec/rake/spectask'
28
+ Spec::Rake::SpecTask.new(:spec) do |spec|
29
+ spec.libs << 'lib' << 'spec'
30
+ spec.spec_files = FileList['spec/**/*_spec.rb']
31
+ end
32
+
33
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
34
+ spec.libs << 'lib' << 'spec'
35
+ spec.pattern = 'spec/**/*_spec.rb'
36
+ spec.rcov = true
37
+ end
38
+
39
+ task :spec => :check_dependencies
40
+
41
+ task :default => :spec
42
+
43
+
44
+ require 'rake/rdoctask'
45
+ Rake::RDocTask.new do |rdoc|
46
+ if File.exist?('VERSION')
47
+ version = File.read('VERSION')
48
+ else
49
+ version = ""
50
+ end
51
+
52
+ rdoc.rdoc_dir = 'rdoc'
53
+ rdoc.title = "allejest #{version}"
54
+ rdoc.rdoc_files.include('README*')
55
+ rdoc.rdoc_files.include('lib/**/*.rb')
56
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
data/bin/allejest ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ $:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
3
+ require 'allejest'
4
+
5
+ AlleJest::Runner.main
@@ -0,0 +1,12 @@
1
+ Dear <%= firstname %>,
2
+
3
+ Your report has arrived:
4
+
5
+ <% results.each do |result| %>
6
+ New entries are available for: <%= result.title %> (id: <%= result.query[:id] %>)
7
+ <% result.items.each do |item| %>
8
+ <%= item.feed_entry.title %> at <%= item.feed_entry.url %>
9
+ <% end %>
10
+ <% end %>
11
+
12
+ AlleJest!
data/lib/allejest.rb ADDED
@@ -0,0 +1,295 @@
1
+ require 'rubygems'
2
+
3
+ require 'active_support'
4
+ require 'open-uri'
5
+ require 'feed_me'
6
+ require 'cgi'
7
+ require 'yaml'
8
+ require 'simply_useful'
9
+ require 'erb'
10
+ require 'pathname'
11
+ require 'net/smtp'
12
+ require 'time'
13
+ require 'pony'
14
+
15
+ # Text query feed: http://allegro.pl/rss.php?category=0&from_showcat=1&string=canon+10-22&feed=search
16
+ # Category query feed: http://allegro.pl/rss.php?feed=cat&id=70563
17
+ # Text and category query feed: http://allegro.pl/rss.php?category=106&sg=0&string=garfield&feed=search
18
+
19
+ # Self note:
20
+ # I always find it hard to design code that is somewhere between a single script
21
+ # and a full-fledged application (software libraries not included).
22
+ # So let's keep it as much as possible close to the MVC pattern, as I think it's the most sane one
23
+ # to go with here.
24
+
25
+ # Parameters
26
+ # string -- for T queries
27
+ # cateogry -- for T and TC queries
28
+ # feed -- for C queries
29
+ # from_showcat -- for C and TC queries
30
+ # sg -- ??
31
+
32
+ module AlleJest
33
+ class Item
34
+ include HasAttributes
35
+
36
+ attr_accessor :feed_entry, :id
37
+
38
+ alias_method :old_initialize, :initialize
39
+
40
+ def initialize(args = {})
41
+ old_initialize(args)
42
+
43
+ self.id = feed_entry.item_id
44
+ end
45
+
46
+ end
47
+
48
+ class SearchResult
49
+ include HasAttributes
50
+
51
+ attr_accessor :feed, :query, :title, :items
52
+
53
+ alias_method :old_initialize, :initialize
54
+
55
+ def initialize(args = {})
56
+ self.items = []
57
+ old_initialize(args)
58
+
59
+ self.title = feed.title.sub("Allegro.pl: ", "")
60
+ end
61
+
62
+ # TODO support non-text queries as well. Write a better matcher after all...
63
+ def matches_query?
64
+ self.title == query[:text]
65
+ end
66
+ end
67
+
68
+ class Reader
69
+
70
+ END_POINT = "http://allegro.pl/rss.php?"
71
+
72
+ attr_accessor :config
73
+
74
+ def initialize(config)
75
+ self.config = config
76
+ end
77
+
78
+ def self.build_url(query = {})
79
+ return if query.blank?
80
+
81
+ q = END_POINT.dup # dup, because q is appended to
82
+
83
+ params = {}
84
+ if query.has_key?(:text)
85
+ params[:string] = query[:text]
86
+ params[:feed] = "search"
87
+ if !query.has_key?(:category)
88
+ params[:category] = 0
89
+ end
90
+ end
91
+ if query.has_key?(:category)
92
+ if query.has_key?(:text)
93
+ params[:category] = query[:category]
94
+ else # Category only queries
95
+ params[:feed] = "cat"
96
+ params[:id] = query[:category]
97
+ end
98
+ end
99
+
100
+ # Using CGI instead of URI, as CGI produced + for space instead of %20 (that's what we need!)
101
+ # See http://www.listable.org/show/difference-between-cgiescape-and-uriescape-in-ruby
102
+ params.each do |k,v|
103
+ q << "#{k.to_s}=#{CGI.escape(v.to_s)}&"
104
+ end
105
+
106
+ return q[0, q.length - 1] if q[q.length - 1] == ?& # remove trailing '&' if exists
107
+ q
108
+ end # build_url
109
+
110
+ def get_feed(query)
111
+ url = AlleJest::Reader.build_url(query)
112
+ content = ""
113
+ open(url) {|s| content = s.read }
114
+ FeedMe.parse(content)
115
+ end
116
+
117
+ def map_feeds_to_queries
118
+ return nil if config.nil? || config[:queries].nil?
119
+
120
+ config[:queries].map do |query|
121
+ [query, get_feed(query)]
122
+ end
123
+ end
124
+
125
+ end
126
+
127
+ class Filter
128
+ include HasAttributes
129
+
130
+ # Pruning strategy
131
+ # prune db every 2 weeks
132
+ # removing elements that are older than 2 months
133
+
134
+
135
+
136
+ attr_accessor :filter_db_path, :filter_db
137
+
138
+ alias_method :old_initialize, :initialize
139
+
140
+ def initialize(args = {})
141
+ old_initialize(args)
142
+ read_db
143
+ end
144
+
145
+ def filter results
146
+ now = Time.now.to_i
147
+
148
+ results.dup.each do |result|
149
+ result.items.reject! do |item|
150
+ id = item.id
151
+ unless id.blank?
152
+ r = filter_db[:reported].has_key? id
153
+ filter_db[:reported][id] = {:first_seen => now} unless r
154
+ r
155
+ else
156
+ true
157
+ end
158
+ end
159
+ end
160
+ end
161
+
162
+ def close
163
+ prune
164
+ save_db
165
+ end
166
+
167
+ private
168
+ def read_db
169
+ self.filter_db = {}
170
+ if File.exist?(filter_db_path)
171
+ f = File.read(filter_db_path)
172
+ self.filter_db = YAML.load(f) unless f.blank?
173
+ end
174
+ self.filter_db.reverse_merge!({:reported => {}, :last_prune => Time.now.to_i})
175
+ end
176
+
177
+ def save_db
178
+ File.open( filter_db_path, 'w' ) do |out|
179
+ YAML.dump(filter_db, out)
180
+ end
181
+ end
182
+
183
+ def prune
184
+ return if filter_db[:last_prune] + 2.weeks > Time.now.to_i # Return if pruned in the last two weeks
185
+
186
+ filter_db[:reported].reject! do |item|
187
+ item[:first_seen] + 2.months < Time.now.to_i
188
+ end
189
+
190
+ filter_db[:last_prune] = Time.now.to_i
191
+ end
192
+ end
193
+
194
+ class Emailer
195
+ include HasAttributes
196
+
197
+ attr_accessor :firstname, :lastname, :email, :results, :from_email, :from_address, :smtp
198
+
199
+ def send_mail
200
+ raw_erb = File.read(find_erb_path)
201
+ erb = ERB.new(raw_erb)
202
+
203
+ email_body = erb.result(binding) #.gsub(/^\s*/, '')
204
+
205
+ pony_opts = {:to => "#{firstname} #{lastname} <#{email}>", :from => from_address,
206
+ :body => email_body, :subject => "AlleJest report for #{Time.new.rfc2822}" }
207
+ #puts pony_opts.inspect
208
+
209
+ Pony.mail(pony_opts)
210
+ end
211
+
212
+ private
213
+ def find_erb_path
214
+ erb_path = nil
215
+ $:.detect do |base_path|
216
+ erb_path = if Pathname.new(base_path).absolute?
217
+ base_path
218
+ else
219
+ File.expand_path File.join(Pathname.pwd, base_path)
220
+ end
221
+ erb_path = File.join(erb_path, 'alle_jest', 'mail.erb')
222
+ File.exist?(erb_path)
223
+ end
224
+ erb_path
225
+ end
226
+
227
+ end
228
+
229
+ # That's awfully, procedurally designed, but I don't care. It should just do it's job.
230
+ class Runner
231
+ include AlleJest
232
+
233
+ attr_accessor :config
234
+
235
+ def initialize(options = {})
236
+ read_config(options[:config_path]) if options.has_key? :config_path
237
+ end
238
+
239
+ def read_config(path)
240
+ return nil if path.blank?
241
+
242
+ content = File.read(path)
243
+ self.config = YAML.load(content)
244
+ config.deep_symbolize_keys! if config.is_a? Hash
245
+ end
246
+
247
+ def run
248
+ reader = Reader.new(config[:reader])
249
+
250
+ # TODO move to Reader
251
+ feeds = reader.map_feeds_to_queries
252
+
253
+ results = feeds.map do |query, feed|
254
+ result = SearchResult.new(:query => query, :feed => feed)
255
+ result.items = feed.entries.map do |entry|
256
+ Item.new(:feed_entry => entry)
257
+ end
258
+ result
259
+ end
260
+
261
+ # Filter results not matching the query
262
+ results.each { |r| r.items = [] if !r.matches_query? }
263
+
264
+ # EOT (end of TODO)
265
+
266
+ if config[:general].try(:[], :filter) == true # (expr == 0) in Ruby evaluates to true!
267
+ filter = Filter.new(:filter_db_path => File.join(File.expand_path("~"), ".allejest", 'filter_db.yml'))
268
+ results = filter.filter(results)
269
+ filter.close
270
+ end
271
+
272
+ # A singleton method :-) I always wanted to write one
273
+ def results.blank?
274
+ return true if self.length == 0
275
+ self.all? do |r|
276
+ r.items.blank?
277
+ end
278
+ end
279
+
280
+ # E-mail only if there are results
281
+ unless results.blank?
282
+ emailer_config = config[:emailer].slice(:from_address, :smtp)
283
+ send_to = config[:emailer][:send_to][0].slice(:email, :firstname, :lastname)
284
+ emailer = Emailer.new(emailer_config.merge!(send_to).merge!({:results => results}))
285
+ emailer.send_mail
286
+ end
287
+
288
+ end
289
+
290
+ def self.main
291
+ AlleJest::Runner.new(:config_path => File.join(File.expand_path("~"), '.allejest', 'config.yml')).run
292
+ end
293
+
294
+ end
295
+ end
@@ -0,0 +1,10 @@
1
+ file.reference.allejest-lib=lib
2
+ file.reference.allejest-test=test
3
+ javac.classpath=
4
+ main.file=
5
+ platform.active=Ruby
6
+ source.encoding=UTF-8
7
+ src.bin.dir=bin
8
+ src.config.dir=config
9
+ src.dir=${file.reference.allejest-lib}
10
+ test.spec.dir=spec
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xmlns="http://www.netbeans.org/ns/project/1">
3
+ <type>org.netbeans.modules.ruby.rubyproject</type>
4
+ <configuration>
5
+ <data xmlns="http://www.netbeans.org/ns/ruby-project/1">
6
+ <name>AlleJest</name>
7
+ <source-roots>
8
+ <root id="src.bin.dir" name="Bin Directory"/>
9
+ <root id="src.dir"/>
10
+ <root id="src.config.dir" name="Config Files"/>
11
+ </source-roots>
12
+ <test-roots>
13
+ <root id="test.spec.dir" name="Spec Files"/>
14
+ </test-roots>
15
+ </data>
16
+ </configuration>
17
+ </project>
@@ -0,0 +1,53 @@
1
+ # Note: File.expand_path converts a pathname to an absolute pathname. (still learning)
2
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3
+
4
+ # Note: for stubbing and mocking see:
5
+ # http://rspec.info/documentation/mocks/stubs.html
6
+
7
+ require 'uri'
8
+
9
+ describe AlleJest::Runner do
10
+
11
+ before :each do
12
+ @alle_jest = AlleJest::Runner.new
13
+ end
14
+
15
+ describe ".read_config" do
16
+ before :all do
17
+ @config_path = File.join(File.dirname(__FILE__), 'fixtures', 'allejest.yml')
18
+ end
19
+
20
+ it "should read 3 queries" do
21
+ c = @alle_jest.read_config(@config_path)
22
+ c[:queries].size.should == 3
23
+
24
+ end
25
+ end
26
+
27
+ end
28
+
29
+ describe AlleJest::Reader do
30
+
31
+ describe ".build_url" do
32
+
33
+ before :each do
34
+ @q = {:id => "foo"}
35
+ end
36
+
37
+ it "should render simple Text queries like allegro" do
38
+ @q.merge!(:text => "simple")
39
+ AlleJest::Reader.build_url(@q).should match_uri("http://allegro.pl/rss.php?category=0&string=simple&feed=search")
40
+ end
41
+
42
+ it "should render Text using URL encoding like allegro" do
43
+ @q.merge!(:text => "not so simple")
44
+ AlleJest::Reader.build_url(@q).should match_uri("http://allegro.pl/rss.php?category=0&string=not+so+simple&feed=search")
45
+ end
46
+
47
+ it "should not return an URL with a trailing &" do
48
+ @q.merge!(:text => "not so simple")
49
+ u = AlleJest::Reader.build_url(@q)
50
+ u[u.length-1].chr.should_not == "&"
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,389 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">
3
+ <channel>
4
+ <title>Allegro.pl: canon 10-22</title>
5
+ <link>http://allegro.pl/search.php?string=canon+10-22</link>
6
+ <description>Oferty sprzedaży spełniające Twoje kryteria wyszukiwania</description>
7
+ <lastBuildDate>Fri, 19 Mar 2010 10:25:14 +0100</lastBuildDate>
8
+ <generator>Allegro RSS Generator ver. 1.30</generator>
9
+ <item>
10
+ <title>Osłona EW-83E EW-83 E Canon 17-40/4, 10-22, 20-35</title>
11
+ <link>http://allegro.pl/show_item.php?item=966299786</link>
12
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=126227&quot;&gt;kubisek&lt;/a&gt;&lt;br /&gt;
13
+ Cena Kup Teraz: 30,00 zł&lt;br /&gt;
14
+ Do końca: 13 dni (czw 01 kwi 2010 23:03:28 CEST)&lt;br /&gt;
15
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=966299786&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
16
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=966299786&amp;name=Os%C5%82ona+EW-83E+EW-83+E+Canon+17-40%2F4%2C+10-22%2C+20-35&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
17
+ &lt;img src=&quot;http://img11.allegroimg.pl/photos/128x96/966/29/97/966299786&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
18
+ </description>
19
+ <pubDate>Thu, 18 Mar 2010 23:03:28 +0100</pubDate>
20
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=966299786</guid>
21
+ </item>
22
+ <item>
23
+ <title>Canon 10-22 mm f/3.5-4.5 EF-S USM SKLEP LESZNO</title>
24
+ <link>http://allegro.pl/show_item.php?item=964454954</link>
25
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=5790374&quot;&gt;Filip871&lt;/a&gt;&lt;br /&gt;
26
+ Cena Kup Teraz: 2 659,00 zł&lt;br /&gt;
27
+ Do końca: 13 dni (czw 01 kwi 2010 16:11:46 CEST)&lt;br /&gt;
28
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=964454954&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
29
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=964454954&amp;name=Canon+10-22+mm+f%2F3.5-4.5+EF-S+USM++SKLEP+LESZNO&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
30
+ &lt;img src=&quot;http://img20.allegroimg.pl/photos/128x96/964/45/49/964454954&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
31
+ </description>
32
+ <pubDate>Thu, 18 Mar 2010 16:11:46 +0100</pubDate>
33
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=964454954</guid>
34
+ </item>
35
+ <item>
36
+ <title>INTERFOTO: Canon 10-22 USM EF-S 10-20 RATY WWA</title>
37
+ <link>http://allegro.pl/show_item.php?item=964209349</link>
38
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=6312476&quot;&gt;www_interfoto_eu&lt;/a&gt;&lt;br /&gt;
39
+ Cena Kup Teraz: 2 350,00 zł&lt;br /&gt;
40
+ Do końca: 12 dni (śro 31 mar 2010 15:29:37 CEST)&lt;br /&gt;
41
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=964209349&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
42
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=964209349&amp;name=INTERFOTO%3A+Canon+10-22+USM+EF-S+10-20+RATY+WWA&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
43
+ &lt;img src=&quot;http://img10.allegroimg.pl/photos/128x96/964/20/93/964209349&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
44
+ </description>
45
+ <pubDate>Wed, 17 Mar 2010 15:29:37 +0100</pubDate>
46
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=964209349</guid>
47
+ </item>
48
+ <item>
49
+ <title>INTERFOTO: Canon 10-22 USM EF-S 10-20 RATY WWA</title>
50
+ <link>http://allegro.pl/show_item.php?item=964181434</link>
51
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=6312476&quot;&gt;www_interfoto_eu&lt;/a&gt;&lt;br /&gt;
52
+ Cena Kup Teraz: 2 699,00 zł&lt;br /&gt;
53
+ Do końca: 12 dni (śro 31 mar 2010 15:12:20 CEST)&lt;br /&gt;
54
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=964181434&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
55
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=964181434&amp;name=INTERFOTO%3A+Canon+10-22+USM+EF-S+10-20+RATY+WWA&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
56
+ &lt;img src=&quot;http://img10.allegroimg.pl/photos/128x96/964/18/14/964181434&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
57
+ </description>
58
+ <pubDate>Wed, 17 Mar 2010 15:12:20 +0100</pubDate>
59
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=964181434</guid>
60
+ </item>
61
+ <item>
62
+ <title>FOTOFORMA Canon EF-S 10-22 mm f/3,5-4,5 USM nowy</title>
63
+ <link>http://allegro.pl/show_item.php?item=964010449</link>
64
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=10200148&quot;&gt;FOTOFORMA_2008&lt;/a&gt;&lt;br /&gt;
65
+ Aktualna cena: 2 649,00 zł&lt;br /&gt;
66
+ Do końca: 12 dni (śro 31 mar 2010 13:23:25 CEST)&lt;br /&gt;
67
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=964010449&quot;&gt;Licytuj&lt;/a&gt;&lt;br /&gt;
68
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=964010449&amp;name=FOTOFORMA+Canon+EF-S+10-22+mm+f%2F3%2C5-4%2C5+USM+nowy&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
69
+ &lt;img src=&quot;http://img14.allegroimg.pl/photos/128x96/964/01/04/964010449&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
70
+ </description>
71
+ <pubDate>Wed, 17 Mar 2010 13:23:25 +0100</pubDate>
72
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=964010449</guid>
73
+ </item>
74
+ <item>
75
+ <title>FOTOFORMA Canon EF-S 10-22 mm f/3,5-4,5 USM nowy</title>
76
+ <link>http://allegro.pl/show_item.php?item=964009835</link>
77
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=10200148&quot;&gt;FOTOFORMA_2008&lt;/a&gt;&lt;br /&gt;
78
+ Aktualna cena: 2 649,00 zł&lt;br /&gt;
79
+ Do końca: 12 dni (śro 31 mar 2010 13:22:50 CEST)&lt;br /&gt;
80
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=964009835&quot;&gt;Licytuj&lt;/a&gt;&lt;br /&gt;
81
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=964009835&amp;name=FOTOFORMA+Canon+EF-S+10-22+mm+f%2F3%2C5-4%2C5+USM+nowy&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
82
+ &lt;img src=&quot;http://img14.allegroimg.pl/photos/128x96/964/00/98/964009835&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
83
+ </description>
84
+ <pubDate>Wed, 17 Mar 2010 13:22:50 +0100</pubDate>
85
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=964009835</guid>
86
+ </item>
87
+ <item>
88
+ <title>BTFOTO: Canon 10-22 f/3,5-4,5 USM</title>
89
+ <link>http://allegro.pl/show_item.php?item=962785139</link>
90
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=6544604&quot;&gt;foto12&lt;/a&gt;&lt;br /&gt;
91
+ Aktualna cena: 2 649,00 zł&lt;br /&gt;
92
+ Do końca: 11 dni (wto 30 mar 2010 16:16:52 CEST)&lt;br /&gt;
93
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=962785139&quot;&gt;Licytuj&lt;/a&gt;&lt;br /&gt;
94
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=962785139&amp;name=BTFOTO%3A+Canon+10-22+f%2F3%2C5-4%2C5+USM&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
95
+ &lt;img src=&quot;http://img14.allegroimg.pl/photos/128x96/962/78/51/962785139&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
96
+ </description>
97
+ <pubDate>Tue, 16 Mar 2010 16:16:52 +0100</pubDate>
98
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=962785139</guid>
99
+ </item>
100
+ <item>
101
+ <title>Osłona typu Canon EW-83E do 16-35, 17-40 L, 10-22</title>
102
+ <link>http://allegro.pl/show_item.php?item=962732472</link>
103
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=3212982&quot;&gt;fripers&lt;/a&gt;&lt;br /&gt;
104
+ Cena Kup Teraz: 34,00 zł&lt;br /&gt;
105
+ Do końca: 4 dni (wto 23 mar 2010 15:29:50 CET)&lt;br /&gt;
106
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=962732472&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
107
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=962732472&amp;name=Os%C5%82ona+typu+Canon+EW-83E+do+16-35%2C+17-40+L%2C+10-22&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
108
+ &lt;img src=&quot;http://img13.allegroimg.pl/photos/128x96/962/73/24/962732472&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
109
+ </description>
110
+ <pubDate>Tue, 16 Mar 2010 15:29:50 +0100</pubDate>
111
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=962732472</guid>
112
+ </item>
113
+ <item>
114
+ <title>CANON EF-S 10-22 f/3.5-4.5 USM - F-VAT</title>
115
+ <link>http://allegro.pl/show_item.php?item=962622721</link>
116
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=438324&quot;&gt;gofinek&lt;/a&gt;&lt;br /&gt;
117
+ Cena Kup Teraz: 2 730,00 zł&lt;br /&gt;
118
+ Do końca: 11 dni (wto 30 mar 2010 14:09:48 CEST)&lt;br /&gt;
119
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=962622721&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
120
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=962622721&amp;name=CANON+EF-S+10-22+f%2F3.5-4.5+USM+-++F-VAT&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
121
+ &lt;br /&gt;
122
+ </description>
123
+ <pubDate>Tue, 16 Mar 2010 14:09:48 +0100</pubDate>
124
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=962622721</guid>
125
+ </item>
126
+ <item>
127
+ <title>Osłona EW-83E EW 83 E do Canon 17-40 10-22 16-35</title>
128
+ <link>http://allegro.pl/show_item.php?item=961347419</link>
129
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=1278223&quot;&gt;guni1&lt;/a&gt;&lt;br /&gt;
130
+ Aktualna cena: 35,00 zł&lt;br /&gt;
131
+ Cena Kup Teraz: 35,00 zł&lt;br /&gt;
132
+ Do końca: 10 dni (pon 29 mar 2010 15:40:35 CEST)&lt;br /&gt;
133
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=961347419&quot;&gt;Licytuj&lt;/a&gt;&lt;br /&gt;
134
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=961347419&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
135
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=961347419&amp;name=Os%C5%82ona+EW-83E+EW+83+E+do+Canon+17-40+10-22+16-35&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
136
+ &lt;img src=&quot;http://img08.allegroimg.pl/photos/128x96/961/34/74/961347419&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
137
+ </description>
138
+ <pubDate>Mon, 15 Mar 2010 15:40:35 +0100</pubDate>
139
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=961347419</guid>
140
+ </item>
141
+ <item>
142
+ <title>Canon 10-22 mm f/3.5-4.5 USM EF-S Sklep WaWa FVat~</title>
143
+ <link>http://allegro.pl/show_item.php?item=961267273</link>
144
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=9905319&quot;&gt;www_fotoklik_pl&lt;/a&gt;&lt;br /&gt;
145
+ Aktualna cena: 2 699,00 zł&lt;br /&gt;
146
+ Do końca: 10 dni (pon 29 mar 2010 15:03:57 CEST)&lt;br /&gt;
147
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=961267273&quot;&gt;Licytuj&lt;/a&gt;&lt;br /&gt;
148
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=961267273&amp;name=Canon+10-22+mm+f%2F3.5-4.5+USM+EF-S+Sklep+WaWa+FVat%7E&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
149
+ &lt;img src=&quot;http://img18.allegroimg.pl/photos/128x96/961/26/72/961267273&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
150
+ </description>
151
+ <pubDate>Mon, 15 Mar 2010 15:03:57 +0100</pubDate>
152
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=961267273</guid>
153
+ </item>
154
+ <item>
155
+ <title>Canon EF-S 10-22 10-22mm f/3.5-4.5 USM małopolska</title>
156
+ <link>http://allegro.pl/show_item.php?item=958916994</link>
157
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=2663575&quot;&gt;londyniak&lt;/a&gt;&lt;br /&gt;
158
+ Cena Kup Teraz: 2 099,00 zł&lt;br /&gt;
159
+ Do końca: 5 dni (śro 24 mar 2010 21:10:36 CET)&lt;br /&gt;
160
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=958916994&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
161
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=958916994&amp;name=Canon+EF-S+10-22+10-22mm+f%2F3.5-4.5+USM+ma%C5%82opolska&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
162
+ &lt;img src=&quot;http://img19.allegroimg.pl/photos/128x96/958/91/69/958916994&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
163
+ </description>
164
+ <pubDate>Sun, 14 Mar 2010 21:10:36 +0100</pubDate>
165
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=958916994</guid>
166
+ </item>
167
+ <item>
168
+ <title>Osłona EW-83E EW-83 E Canon 17-40/4, 10-22, 20-35</title>
169
+ <link>http://allegro.pl/show_item.php?item=960183468</link>
170
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=13370926&quot;&gt;Kunszt_66a&lt;/a&gt;&lt;br /&gt;
171
+ Cena Kup Teraz: 30,00 zł&lt;br /&gt;
172
+ Do końca: 25 dni (wto 13 kwi 2010 19:00:20 CEST)&lt;br /&gt;
173
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=960183468&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
174
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=960183468&amp;name=Os%C5%82ona+EW-83E+EW-83+E+Canon+17-40%2F4%2C+10-22%2C+20-35&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
175
+ &lt;img src=&quot;http://img03.allegroimg.pl/photos/128x96/960/18/34/960183468&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
176
+ </description>
177
+ <pubDate>Sun, 14 Mar 2010 19:00:20 +0100</pubDate>
178
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=960183468</guid>
179
+ </item>
180
+ <item>
181
+ <title>NAJTANIEJ Canon EW-83E Oryginał 10-22 16-35 17-40</title>
182
+ <link>http://allegro.pl/show_item.php?item=957619541</link>
183
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=85078&quot;&gt;Rupert_K&lt;/a&gt;&lt;br /&gt;
184
+ Cena Kup Teraz: 99,00 zł&lt;br /&gt;
185
+ Do końca: 5 dni (śro 24 mar 2010 14:23:16 CET)&lt;br /&gt;
186
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=957619541&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
187
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=957619541&amp;name=NAJTANIEJ+Canon+EW-83E+Orygina%C5%82+10-22+16-35+17-40&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
188
+ &lt;img src=&quot;http://img17.allegroimg.pl/photos/128x96/957/61/95/957619541&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
189
+ </description>
190
+ <pubDate>Sun, 14 Mar 2010 14:23:16 +0100</pubDate>
191
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=957619541</guid>
192
+ </item>
193
+ <item>
194
+ <title>OSŁONA EW-83E CANON 17-40 20-35 16-35 10-22 mm</title>
195
+ <link>http://allegro.pl/show_item.php?item=957671641</link>
196
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=10320563&quot;&gt;FOTO-MONOLIT&lt;/a&gt;&lt;br /&gt;
197
+ Cena Kup Teraz: 30,00 zł&lt;br /&gt;
198
+ Do końca: 23 dni (nie 11 kwi 2010 17:37:55 CEST)&lt;br /&gt;
199
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=957671641&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
200
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=957671641&amp;name=OS%C5%81ONA+EW-83E+CANON+17-40+20-35+16-35+10-22+mm&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
201
+ &lt;img src=&quot;http://img06.allegroimg.pl/photos/128x96/957/67/16/957671641&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
202
+ </description>
203
+ <pubDate>Fri, 12 Mar 2010 17:37:55 +0100</pubDate>
204
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=957671641</guid>
205
+ </item>
206
+ <item>
207
+ <title>Osłona EW-83E EW-83 E Canon 17-40/4, 10-22, 20-35</title>
208
+ <link>http://allegro.pl/show_item.php?item=957520690</link>
209
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=4275619&quot;&gt;fotoabc_com&lt;/a&gt;&lt;br /&gt;
210
+ Cena Kup Teraz: 30,00 zł&lt;br /&gt;
211
+ Do końca: 3 dni (pon 22 mar 2010 15:30:06 CET)&lt;br /&gt;
212
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=957520690&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
213
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=957520690&amp;name=Os%C5%82ona+EW-83E+EW-83+E+Canon+17-40%2F4%2C+10-22%2C+20-35&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
214
+ &lt;img src=&quot;http://img17.allegroimg.pl/photos/128x96/957/52/06/957520690&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
215
+ </description>
216
+ <pubDate>Fri, 12 Mar 2010 15:30:06 +0100</pubDate>
217
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=957520690</guid>
218
+ </item>
219
+ <item>
220
+ <title>Canon EW-83E do 10-22 17-40 16-35 Oryginał! F VAT</title>
221
+ <link>http://allegro.pl/show_item.php?item=955771375</link>
222
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=3975973&quot;&gt;Foto-ivy&lt;/a&gt;&lt;br /&gt;
223
+ Cena Kup Teraz: 138,00 zł&lt;br /&gt;
224
+ Do końca: 5 dni (czw 25 mar 2010 09:20:25 CET)&lt;br /&gt;
225
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=955771375&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
226
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=955771375&amp;name=Canon+EW-83E+do+10-22+17-40+16-35+Orygina%C5%82%21+F+VAT&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
227
+ &lt;img src=&quot;http://img03.allegroimg.pl/photos/128x96/955/77/13/955771375&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
228
+ </description>
229
+ <pubDate>Thu, 11 Mar 2010 09:20:25 +0100</pubDate>
230
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=955771375</guid>
231
+ </item>
232
+ <item>
233
+ <title>OSŁONA DO CANON EW-83E 17-40 20-35 16-35 10-22 MM</title>
234
+ <link>http://allegro.pl/show_item.php?item=955302294</link>
235
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=1158478&quot;&gt;ibrokers&lt;/a&gt;&lt;br /&gt;
236
+ Cena Kup Teraz: 35,00 zł&lt;br /&gt;
237
+ Do końca: 21 dni (pią 09 kwi 2010 20:26:55 CEST)&lt;br /&gt;
238
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=955302294&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
239
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=955302294&amp;name=OS%C5%81ONA+DO+CANON+EW-83E+17-40+20-35+16-35+10-22+MM&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
240
+ &lt;img src=&quot;http://img12.allegroimg.pl/photos/128x96/955/30/22/955302294&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
241
+ </description>
242
+ <pubDate>Wed, 10 Mar 2010 20:26:55 +0100</pubDate>
243
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=955302294</guid>
244
+ </item>
245
+ <item>
246
+ <title>Canon 10-22 mm f/3.5-4.5 EF-S USM Fvat 10-22mm</title>
247
+ <link>http://allegro.pl/show_item.php?item=954200532</link>
248
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=3139398&quot;&gt;eurocamerapl&lt;/a&gt;&lt;br /&gt;
249
+ Cena Kup Teraz: 2 749,00 zł&lt;br /&gt;
250
+ Do końca: 4 dni (śro 24 mar 2010 01:04:01 CET)&lt;br /&gt;
251
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=954200532&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
252
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=954200532&amp;name=Canon+10-22+mm+f%2F3.5-4.5+EF-S+USM+Fvat+10-22mm&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
253
+ &lt;img src=&quot;http://img14.allegroimg.pl/photos/128x96/954/20/05/954200532&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
254
+ </description>
255
+ <pubDate>Wed, 10 Mar 2010 01:04:01 +0100</pubDate>
256
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=954200532</guid>
257
+ </item>
258
+ <item>
259
+ <title>NOWY Canon EF S 10-22 mm f.3.5-4.5 USM - FVAT</title>
260
+ <link>http://allegro.pl/show_item.php?item=952503646</link>
261
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=1181485&quot;&gt;koniopl&lt;/a&gt;&lt;br /&gt;
262
+ Cena Kup Teraz: 2 490,00 zł&lt;br /&gt;
263
+ Do końca: 4 dni (wto 23 mar 2010 16:32:46 CET)&lt;br /&gt;
264
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=952503646&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
265
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=952503646&amp;name=NOWY+Canon+EF+S+10-22+mm+f.3.5-4.5+USM+-+FVAT&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
266
+ &lt;img src=&quot;http://img08.allegroimg.pl/photos/128x96/952/50/36/952503646&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
267
+ </description>
268
+ <pubDate>Tue, 09 Mar 2010 16:32:46 +0100</pubDate>
269
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=952503646</guid>
270
+ </item>
271
+ <item>
272
+ <title>OSŁONA CANON EW-83E do EF 16-35 17-40 EF-S 10-22</title>
273
+ <link>http://allegro.pl/show_item.php?item=953276515</link>
274
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=1548914&quot;&gt;fotoenergia&lt;/a&gt;&lt;br /&gt;
275
+ Cena Kup Teraz: 30,00 zł&lt;br /&gt;
276
+ Do końca: 4 dni (wto 23 mar 2010 13:16:15 CET)&lt;br /&gt;
277
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=953276515&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
278
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=953276515&amp;name=OS%C5%81ONA+CANON+EW-83E+do+EF+16-35+17-40+EF-S+10-22&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
279
+ &lt;img src=&quot;http://img18.allegroimg.pl/photos/128x96/953/27/65/953276515&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
280
+ </description>
281
+ <pubDate>Tue, 09 Mar 2010 13:16:15 +0100</pubDate>
282
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=953276515</guid>
283
+ </item>
284
+ <item>
285
+ <title>Canon EW-83E do 10-22 17-35 17-40 17-35</title>
286
+ <link>http://allegro.pl/show_item.php?item=952360969</link>
287
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=74775&quot;&gt;Aragon&lt;/a&gt;&lt;br /&gt;
288
+ Cena Kup Teraz: 27,00 zł&lt;br /&gt;
289
+ Do końca: 3 dni (pon 22 mar 2010 19:49:56 CET)&lt;br /&gt;
290
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=952360969&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
291
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=952360969&amp;name=Canon+EW-83E+do+10-22+17-35+17-40+17-35&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
292
+ &lt;img src=&quot;http://img01.allegroimg.pl/photos/128x96/952/36/09/952360969&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
293
+ </description>
294
+ <pubDate>Mon, 08 Mar 2010 19:49:56 +0100</pubDate>
295
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=952360969</guid>
296
+ </item>
297
+ <item>
298
+ <title>e-oko Canon 10-22/3.5-4.5 USM EF-S F-VAT!OD REKI!</title>
299
+ <link>http://allegro.pl/show_item.php?item=952157635</link>
300
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=4230730&quot;&gt;e-oko&lt;/a&gt;&lt;br /&gt;
301
+ Aktualna cena: 2 899,00 zł&lt;br /&gt;
302
+ Do końca: 3 dni (pon 22 mar 2010 17:37:44 CET)&lt;br /&gt;
303
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=952157635&quot;&gt;Licytuj&lt;/a&gt;&lt;br /&gt;
304
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=952157635&amp;name=e-oko+Canon+10-22%2F3.5-4.5+USM+EF-S+F-VAT%21OD+REKI%21&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
305
+ &lt;img src=&quot;http://img09.allegroimg.pl/photos/128x96/952/15/76/952157635&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
306
+ </description>
307
+ <pubDate>Mon, 08 Mar 2010 17:37:44 +0100</pubDate>
308
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=952157635</guid>
309
+ </item>
310
+ <item>
311
+ <title>BEA: CANON EFS 10-22 f /3.5-4.5USM F-VAT22% RATY1%</title>
312
+ <link>http://allegro.pl/show_item.php?item=951764564</link>
313
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=10148626&quot;&gt;BEA-FOTO&lt;/a&gt;&lt;br /&gt;
314
+ Aktualna cena: 2 689,00 zł&lt;br /&gt;
315
+ Do końca: 3 dni (pon 22 mar 2010 12:41:21 CET)&lt;br /&gt;
316
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=951764564&quot;&gt;Licytuj&lt;/a&gt;&lt;br /&gt;
317
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=951764564&amp;name=BEA%3A+CANON+EFS+10-22+f+%2F3.5-4.5USM+F-VAT22%25+RATY1%25&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
318
+ &lt;img src=&quot;http://img18.allegroimg.pl/photos/128x96/951/76/45/951764564&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
319
+ </description>
320
+ <pubDate>Mon, 08 Mar 2010 12:41:21 +0100</pubDate>
321
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=951764564</guid>
322
+ </item>
323
+ <item>
324
+ <title>Canon 10-22 mm f/3.5-4.5 WROCŁAW SKLEP APCOM</title>
325
+ <link>http://allegro.pl/show_item.php?item=951144352</link>
326
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=98373&quot;&gt;pity&lt;/a&gt;&lt;br /&gt;
327
+ Aktualna cena: 2 699,00 zł&lt;br /&gt;
328
+ Do końca: 2 dni (nie 21 mar 2010 21:59:36 CET)&lt;br /&gt;
329
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=951144352&quot;&gt;Licytuj&lt;/a&gt;&lt;br /&gt;
330
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=951144352&amp;name=Canon+10-22+mm+f%2F3.5-4.5+WROC%C5%81AW+SKLEP+APCOM&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
331
+ &lt;img src=&quot;http://img13.allegroimg.pl/photos/128x96/951/14/43/951144352&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
332
+ </description>
333
+ <pubDate>Sun, 07 Mar 2010 21:59:36 +0100</pubDate>
334
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=951144352</guid>
335
+ </item>
336
+ <item>
337
+ <title>KUP TERAZ CANON 10-22 USM NOWY,GWAR, F-VAT</title>
338
+ <link>http://allegro.pl/show_item.php?item=950608159</link>
339
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=9783704&quot;&gt;pasazfoto&lt;/a&gt;&lt;br /&gt;
340
+ Cena Kup Teraz: 2 698,00 zł&lt;br /&gt;
341
+ Do końca: 2 dni (nie 21 mar 2010 16:20:10 CET)&lt;br /&gt;
342
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=950608159&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
343
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=950608159&amp;name=KUP+TERAZ+CANON+10-22+USM+NOWY%2CGWAR%2C+F-VAT&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
344
+ &lt;img src=&quot;http://img15.allegroimg.pl/photos/128x96/950/60/81/950608159&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
345
+ </description>
346
+ <pubDate>Sun, 07 Mar 2010 16:20:10 +0100</pubDate>
347
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=950608159</guid>
348
+ </item>
349
+ <item>
350
+ <title>CANON 10-22 mm 3.5-4.5</title>
351
+ <link>http://allegro.pl/show_item.php?item=948761359</link>
352
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=2579035&quot;&gt;gerigeri&lt;/a&gt;&lt;br /&gt;
353
+ Aktualna cena: 1 900,00 zł&lt;br /&gt;
354
+ Do końca: 11 godz. (pią 19 mar 2010 21:47:20 CET)&lt;br /&gt;
355
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=948761359&quot;&gt;Licytuj&lt;/a&gt;&lt;br /&gt;
356
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=948761359&amp;name=CANON+10-22+mm+3.5-4.5&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
357
+ &lt;img src=&quot;http://img09.allegroimg.pl/photos/128x96/948/76/13/948761359&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
358
+ </description>
359
+ <pubDate>Fri, 05 Mar 2010 21:47:20 +0100</pubDate>
360
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=948761359</guid>
361
+ </item>
362
+ <item>
363
+ <title>Canon EF-S 10-22 f/3.5-4.5 USM, RATY, LEASING</title>
364
+ <link>http://allegro.pl/show_item.php?item=936029100</link>
365
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=3241561&quot;&gt;winmar_pl&lt;/a&gt;&lt;br /&gt;
366
+ Cena Kup Teraz: 3 099,00 zł&lt;br /&gt;
367
+ Do końca: 6 dni (czw 25 mar 2010 23:08:24 CET)&lt;br /&gt;
368
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=936029100&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
369
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=936029100&amp;name=Canon+EF-S+10-22+f%2F3.5-4.5+USM%2C+RATY%2C+LEASING&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
370
+ &lt;img src=&quot;http://img19.allegroimg.pl/photos/128x96/936/02/91/936029100&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
371
+ </description>
372
+ <pubDate>Tue, 23 Feb 2010 23:08:24 +0100</pubDate>
373
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=936029100</guid>
374
+ </item>
375
+ <item>
376
+ <title>OSŁONA CANON EW-83E 20-35 17-40 16-35 10-22 mm</title>
377
+ <link>http://allegro.pl/show_item.php?item=928240846</link>
378
+ <description>Sprzedający: &lt;a href=&quot;http://allegro.pl/show_user.php?uid=3832142&quot;&gt;qwadron&lt;/a&gt;&lt;br /&gt;
379
+ Cena Kup Teraz: 31,00 zł&lt;br /&gt;
380
+ Do końca: 9 godz. (pią 19 mar 2010 19:41:13 CET)&lt;br /&gt;
381
+ &lt;a href=&quot;http://allegro.pl/show_item.php?item=928240846&quot;&gt;Kup Teraz&lt;/a&gt;&lt;br /&gt;
382
+ &lt;a href=&quot;http://allegro.pl/add_to_watchlist_rss.php?item_id=928240846&amp;name=OS%C5%81ONA+CANON+EW-83E+20-35+17-40+16-35+10-22+mm&quot;&gt;Dodaj do obserwowanych aukcji&lt;/a&gt;&lt;br /&gt;
383
+ &lt;img src=&quot;http://photos02.allegroimg.pl/photos/128x96/928/24/08/928240846&quot; width=&quot;128&quot; height=&quot;96&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
384
+ </description>
385
+ <pubDate>Wed, 17 Feb 2010 19:41:13 +0100</pubDate>
386
+ <guid isPermaLink="false">http://allegro.pl/show_item.php?item=928240846</guid>
387
+ </item>
388
+ </channel>
389
+ </rss>
@@ -0,0 +1,9 @@
1
+ # Example configuration
2
+ queries:
3
+ - id: canon_10_22
4
+ text: Canon 10 22
5
+ - id: samsung_i7500
6
+ category: 70563
7
+ - id: garfield
8
+ text: garfield
9
+ category: 106
data/spec/matchers.rb ADDED
@@ -0,0 +1,62 @@
1
+ # http://www.robertsosinski.com/2008/12/10/up-and-running-with-custom-rspec-matchers/
2
+
3
+ require 'uri'
4
+
5
+ module Matchers
6
+ class MatchUri
7
+ def initialize(expected)
8
+ @expected_str = expected
9
+ @expected_uri = URI.parse(@expected_str) unless expected.blank?
10
+ end
11
+
12
+ def matches?(actual)
13
+ @actual_str = actual
14
+ return false if @expected_uri.nil?
15
+
16
+ # Check if no exceptions are thrown
17
+ @actual_uri = URI.parse(@actual_str) unless actual.blank?
18
+ return false if @actual_uri.blank?
19
+
20
+ # aliases
21
+ a = @actual_uri
22
+ e = @expected_uri
23
+
24
+ [:scheme, :userinfo, :host, :port, :path, :fragment].each do |c|
25
+ return false unless a.send(c) == e.send(c)
26
+ end
27
+
28
+ qs = [a.query, e.query].collect do |q|
29
+ q.split(/(&amp;|&)/).sort.reject{|t| ["&", "&amp;"].include? t }
30
+ end
31
+
32
+ return false unless qs[0] == qs[1]
33
+
34
+ return true
35
+ end
36
+
37
+ def failure_message
38
+ initial_fail_msg = initial_failure
39
+ return initial_fail_msg unless initial_fail_msg.blank?
40
+
41
+ "expected '#{@expected_str}' but got '#{@actual_str}'"
42
+ end
43
+
44
+ def negative_failure_message
45
+ initial_fail_msg = initial_failure
46
+ return initial_fail_msg unless initial_fail_msg.blank?
47
+
48
+ "expected something else then '#{@expected_str_}' but got '#{@actual_str}'"
49
+ end
50
+
51
+ private
52
+ def initial_failure
53
+ return "could not parse expected URI" if @expected_uri.nil?
54
+ return "could not parse actual URI" if @actual_uri.nil?
55
+ end
56
+
57
+ end
58
+
59
+ def match_uri(expected)
60
+ MatchUri.new(expected)
61
+ end
62
+ end
@@ -0,0 +1,10 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+ require 'allejest'
4
+ require 'spec'
5
+ require 'spec/autorun'
6
+ require 'matchers'
7
+
8
+ Spec::Runner.configure do |config|
9
+ config.include(Matchers)
10
+ end
metadata ADDED
@@ -0,0 +1,146 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: allejest
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - Maciej Bilas
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-03-20 00:00:00 +01:00
18
+ default_executable: allejest
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rspec
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :development
31
+ version_requirements: *id001
32
+ - !ruby/object:Gem::Dependency
33
+ name: activesupport
34
+ prerelease: false
35
+ requirement: &id002 !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ segments:
40
+ - 2
41
+ - 3
42
+ - 0
43
+ version: 2.3.0
44
+ type: :runtime
45
+ version_requirements: *id002
46
+ - !ruby/object:Gem::Dependency
47
+ name: feed_me
48
+ prerelease: false
49
+ requirement: &id003 !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ segments:
54
+ - 0
55
+ - 6
56
+ - 0
57
+ version: 0.6.0
58
+ type: :runtime
59
+ version_requirements: *id003
60
+ - !ruby/object:Gem::Dependency
61
+ name: simply_useful
62
+ prerelease: false
63
+ requirement: &id004 !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ segments:
68
+ - 0
69
+ - 1
70
+ - 6
71
+ version: 0.1.6
72
+ type: :runtime
73
+ version_requirements: *id004
74
+ - !ruby/object:Gem::Dependency
75
+ name: pony
76
+ prerelease: false
77
+ requirement: &id005 !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ segments:
82
+ - 0
83
+ - 9
84
+ version: "0.9"
85
+ type: :runtime
86
+ version_requirements: *id005
87
+ description: "Powiadamia e-mailem o dost\xC4\x99pno\xC5\x9Bci przedmiot\xC3\xB3w na allegro."
88
+ email: maciej@inszy.org
89
+ executables:
90
+ - allejest
91
+ extensions: []
92
+
93
+ extra_rdoc_files:
94
+ - LICENSE
95
+ - README.rdoc
96
+ files:
97
+ - .document
98
+ - .gitignore
99
+ - LICENSE
100
+ - README.rdoc
101
+ - Rakefile
102
+ - VERSION
103
+ - bin/allejest
104
+ - lib/alle_jest/mail.erb
105
+ - lib/allejest.rb
106
+ - nbproject/project.properties
107
+ - nbproject/project.xml
108
+ - spec/allejest_spec.rb
109
+ - spec/fixtures/allegro_canon1022_results.rss
110
+ - spec/fixtures/allejest.yml
111
+ - spec/matchers.rb
112
+ - spec/spec_helper.rb
113
+ has_rdoc: true
114
+ homepage: http://github.com/maciej/allejest
115
+ licenses: []
116
+
117
+ post_install_message:
118
+ rdoc_options:
119
+ - --charset=UTF-8
120
+ require_paths:
121
+ - lib
122
+ required_ruby_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ segments:
127
+ - 0
128
+ version: "0"
129
+ required_rubygems_version: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ segments:
134
+ - 0
135
+ version: "0"
136
+ requirements: []
137
+
138
+ rubyforge_project: allejest
139
+ rubygems_version: 1.3.6
140
+ signing_key:
141
+ specification_version: 3
142
+ summary: "Powiadamia e-mailem o dost\xC4\x99pno\xC5\x9Bci przedmiot\xC3\xB3w na allegro"
143
+ test_files:
144
+ - spec/spec_helper.rb
145
+ - spec/matchers.rb
146
+ - spec/allejest_spec.rb