sutazekarate 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4caf8697bf7ba6bfa70a5ea0311069bbc5fe1e0063c176e5f62a92040574280e
4
- data.tar.gz: 96755e454433675a5f74296bd5e25e4c576ca244cdfe2087ba444ddde1aa0cc9
3
+ metadata.gz: 9affd5ab82a716e54b9e0d6eb78ae74c3898327e0d32949588dd36218a163e46
4
+ data.tar.gz: baa04e8b11ad761622ae6dd004e5baffff30f3663deb2de5f80f2224f4e06d7c
5
5
  SHA512:
6
- metadata.gz: d75859d0a13c4a56230ce20753545e3cffe38480d9a195e40f87f9274dc63ac7018cd6e76c333dad7264f11a5553fb8345737eaa65dbc4a5b447046a4f08430d
7
- data.tar.gz: abd7ede1653478ed7ccc13354868269707dc5e3a399d0f53e2bb960b3d5ad2839a6ceaeeb016b971f3838bdfa4193e76d95c07b1790b6ec374ee088a510a9c07
6
+ metadata.gz: 188676dca6c78d765ca754a0520f7371f4bab32a2ed9413dd431d14c931a3e2ff8ea87a6f2cbc751573b37fffad343a9ad2ea9c4c248e9dc9129b26e7bde8b78
7
+ data.tar.gz: 3aba9d16de529537c4b8aa00db065fa84665849fa0f473296c2a5bf85399d0186175e30706779c5940fa111146b2ccc44f9bc217ab965a29454dcce4320ac27f
@@ -13,6 +13,7 @@ module Sutazekarate
13
13
  include Concurrent::Async
14
14
 
15
15
  attribute :id
16
+ attribute :image_url
16
17
  attribute :starts_at
17
18
  attribute :name
18
19
  attribute :club
@@ -62,6 +63,8 @@ module Sutazekarate
62
63
  response = HTTP.get("https://www.sutazekarate.sk/sutaze_sutazinf.php?sutaz=#{id}")
63
64
  html = Nokogiri::HTML5.fragment(response.body.to_s)
64
65
 
66
+ image_path = html.search('img.img-responsive.no-margin').attr('src').value
67
+ image_url = "https://www.sutazekarate.sk/#{image_path}"
65
68
  name = html.search('h3.section-title-inner').text.strip.rpartition(' - ').first
66
69
  club = html.search('.table1 tr:nth-child(1) td:nth-child(2)').text.strip
67
70
 
@@ -83,6 +86,7 @@ module Sutazekarate
83
86
 
84
87
  Competition.new(
85
88
  id:,
89
+ image_url:,
86
90
  starts_at:,
87
91
  name:,
88
92
  club:,
@@ -99,7 +103,10 @@ module Sutazekarate
99
103
  rows.map do |row|
100
104
  starts_at = Date.parse(row['datum'])
101
105
  content = Nokogiri::HTML5.fragment(row['obsah'])
106
+ image = Nokogiri::HTML5.fragment(row['obrazok'])
102
107
 
108
+ image_path = image.search('img').attr('src').value
109
+ image_url = "https://www.sutazekarate.sk/#{image_path}"
103
110
  name = content.search('h4').first.text.strip
104
111
  club_element = content.search('h5').first
105
112
  club = club_element.text.strip
@@ -122,6 +129,7 @@ module Sutazekarate
122
129
 
123
130
  Competition.new(
124
131
  id:,
132
+ image_url:,
125
133
  starts_at:,
126
134
  name:,
127
135
  club:,
@@ -1,3 +1,3 @@
1
1
  module Sutazekarate
2
- VERSION = '0.0.10'.freeze
2
+ VERSION = '0.0.11'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sutazekarate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmed Al Hafoudh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-16 00:00:00.000000000 Z
11
+ date: 2025-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http