grab_epg 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjEyMGIxODE0NDRjN2EwNzM3ODc1NzljNGMzNWIxNmYwMmM3ZWRkNQ==
4
+ ZmJlYTQyZGYzNWE1Yzc5ZmRjMWY4YTU3ODlmMjc0MTVmMGNhYTg0MQ==
5
5
  data.tar.gz: !binary |-
6
- NWRlMjBhNDc0NGE3YThlMmY4OWVkYWZkMjRmYjBkMDk4YTFlZWQyMQ==
6
+ MGIyNDhjYWM0NjExNmY4MWQzNmJiNmFkNjQzNDU2ZDY3MzJkYmYxOQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZDJkMWQ2Mzc1NWI2MWY1Zjg3OGRmYjUzYmRjZWFhMjZmODEyMWZlMDk4OGNh
10
- NmQ3OTU0ODgyNTQ1YjE1ZjQ4ZWEwOWI0NzNlYzQyOGE0N2E0MzM4M2I1MGE3
11
- NzdmZDJlNThmNWIzMDUwMWZlNWQzYzE5NzE4NDVmZjk0YzFiNDI=
9
+ NDY5MTJkOWYwN2EzOGIzZWFjNWM3NDY1MjQwMGQ4YmNlODNjMzIyYTgzMzNk
10
+ MzU3YzVkYTFmOTM2NmNmOGFlMTU4OTc4NGI1MWY4M2VhNTMyNGQ2YjVmZjVl
11
+ ZjkwYWIwMTY5MGYxY2UwMjhhZTJkN2VhODg1ZTYyZjBkZWZiYTA=
12
12
  data.tar.gz: !binary |-
13
- MDk5ODY3MTRjZDQzMGNlOGNlNWUzZDQ0NDRiY2I5MWZiMjg2Mjc0M2JhODUy
14
- Y2JhZjEwZDExMTE1ZTdkOGE2YmM1N2Q0MzdjN2I4NDRjNzQ1MzkxMWRjNDVi
15
- MTgzMGUwYTRiNTg4NmZiYjI1NzFmMDNlMTU4NTZkMzg5MzVhNmI=
13
+ Y2MzN2QwNjU1NGRhOTQ3ZTBlMmNhMjE0ZjI5YmNmMmM4ZDJkYWM1NWFkZjcy
14
+ NTEwYmZiYmFlZDcwOTgyNWY2MzJhMjY4OThmNjMxOTEzNzA1YzJmMTEwNGYw
15
+ NTIwODMzN2U1ODEyNGJmMmYxZDA1ZjIxNTZhMTEwNDRlM2E0NTY=
data/.grabepg.gemspec CHANGED
@@ -10,6 +10,6 @@ Gem::Specification.new do |gem|
10
10
  gem.files = `git ls-files`.split($\)
11
11
  gem.name = "grab_epg"
12
12
  gem.require_paths = ["lib"]
13
- gem.version = "1.0.0"
13
+ gem.version = "1.0.1"
14
14
  gem.homepage = "https://github.com/hahazql/grab_epg"
15
15
  end
data/README.md CHANGED
@@ -3,41 +3,6 @@ grab_epg
3
3
  eg:
4
4
  gem grab_epg
5
5
 
6
- proxy_list=Grabepg.get_topfast_list
7
6
 
8
- Grabepg.getchannels.each do |channel,url|
9
-
10
- Grabepg.getschedule(channel,url,proxy_list)
11
-
12
- end
13
-
14
-
15
- Grabepg.getschedule 的返回:
16
-
17
- channel_schedule 是日期的时间表
18
-
19
- show_schedule 是根据节目的时间表
20
-
21
- {"channel_schedule"=>channel_schedule,"show_schedule"=>@show_schedule}
22
-
23
-
24
-
25
- #获取频道列表,并将频道的图片路径保存到指定的文件夹内
26
-
27
- channel_urls = Grabepg.getchannels("/home/zql")
28
-
29
- #获取比较的代理列表
30
-
31
- proxy_list=Grabepg.get_topfast_list
32
-
33
- img_down_path = Grabepg.img_down_path
34
-
35
- #遍历频道列表
36
-
37
- channel_urls.each do |channel,url|
38
-
39
- #获取节目信息,并将节目图片路径保存在制定文件中
40
-
41
- GetSchedule : #{Grabepg.getschedule(channel,url,proxy_list,"/home/zql")}"
42
-
43
- end
7
+ 1.0.1 对于代理的选取进行修改,添加当前时间作为选取的参数之一
8
+ 1.0.0 定型版本
data/lib/grab_tvmao.rb CHANGED
@@ -399,7 +399,7 @@ module Grabepg
399
399
  @@proxyindex = 0
400
400
  end
401
401
  @size = proxylist.size
402
- @@proxyindex=@@proxyindex+1
402
+ @@proxyindex=@@proxyindex+Time.now.to_i+1
403
403
  @@proxyindex=@@proxyindex%@size
404
404
  if(proxylist[@@proxyindex])
405
405
  proxy = proxylist[@@proxyindex]
@@ -420,7 +420,7 @@ module Grabepg
420
420
  doc=err_doc_proxy(proxy,proxylist,url,err.to_s)
421
421
  @no_firest=0
422
422
  p "Get DOC"
423
- @@proxyindex=@@proxyindex+1
423
+ @@proxyindex=@@proxyindex+Time.now.to_i+1
424
424
  @@proxyindex=@@proxyindex%@size
425
425
  return doc
426
426
  end
@@ -177,10 +177,12 @@ module Grabepg
177
177
  @no_firest=0
178
178
  p "Get DOC"
179
179
  @proxyindex += 1
180
+ @proxyindex = @proxyindex + Time.now.to_i
180
181
  @proxyindex=@proxyindex%@size
181
182
  return doc
182
183
  end
183
184
  @proxyindex += 1
185
+ @proxyindex = @proxyindex + Time.now.to_i
184
186
  @proxyindex=@proxyindex%@size
185
187
  else
186
188
  begin
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grab_epg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - hahazql
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-21 00:00:00.000000000 Z
11
+ date: 2013-06-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ! '"用于抓取EPG信息"'
14
14
  email: