grab_epg 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/.grabepg.gemspec +1 -1
- data/Gemfile +1 -0
- data/lib/debug.rb +3 -1
- data/lib/grabepg/grab_base.rb +10 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZWYyYTBjOGUzMmEzZjk2MjdjNjczNmFiMjRkMTg1ZjViZjY3YTk1ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDU3OTNmODUzNDYxODhjZDc0YmM5YTkyYmU3NTY2MDg0MjdmMmEyNg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2Q2MThkNmFhNDYzY2RlOTU1OWZlMTBhZDY2ODgxNTZmZTk5MWQ4MDEyN2Yx
|
10
|
+
MDczNjkyZWU0ZDUyMzFiMzE3YWI3Yjg0NjA2ZjFiNzdlNjQ0ZWIyYWM0NjA2
|
11
|
+
OTEyOWIwMmVkNjg0YjJiMmZhMGE3ZDE4NWY5NGRmYTViZTAzZTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjI3ZTY4NGFiNjQzODBlY2Q2ODkwMzdhZDhhNDIxMjQ0MGZhZGE4NGNlMDlj
|
14
|
+
ZjE5OTgzMGY0MDkyNDY2MTk5ZjU3MjkwZWIzYmNjODhmOWEzNGIyMDlhM2Qz
|
15
|
+
ZDkxNTExMWYzNTBlNTY2MzU0NGIxNThiNDQ0Y2EzZDAxMzQ3NTY=
|
data/.grabepg.gemspec
CHANGED
data/Gemfile
CHANGED
data/lib/debug.rb
CHANGED
@@ -4,11 +4,13 @@ require 'nokogiri'
|
|
4
4
|
require 'open-uri'
|
5
5
|
require File.expand_path("../test/test_grab_tvsou.rb", __FILE__)
|
6
6
|
require File.expand_path("../test/test_grab_tvmao.rb", __FILE__)
|
7
|
+
require File.expand_path("../test/test_grab_base.rb", __FILE__)
|
7
8
|
#require 'test/test_grab_tvsou'
|
8
9
|
class Debug
|
9
10
|
# To change this template use File | Settings | File Templates.
|
10
11
|
#proxylist = ["219.234.82.84:24809", "219.234.82.84:17130", "219.234.82.84:23684", "219.234.82.84:18253", "219.234.82.84:33987", "219.234.82.84:17183", "219.234.82.84:13243", "219.234.82.84:16158", "219.234.82.84:14826", "219.234.82.84:8489", "219.234.82.84:22222", "219.234.82.84:6370", "219.234.82.84:7571", "219.234.82.84:33944", "219.234.82.84:9743", "219.234.82.84:8089", "219.234.82.84:20991", "219.234.82.84:34032", "219.234.82.84:9415", "219.234.82.84:26149", "219.234.82.84:11095", "219.234.82.84:21724", "219.234.82.84:9177", "219.234.82.84:34034", "219.234.82.84:17945", "219.234.82.85:32229", "219.234.82.85:28341", "219.234.82.85:36314", "219.234.82.85:30605", "219.234.82.85:23684", "219.234.82.85:34015", "219.234.82.85:33919", "219.234.82.85:30639", "219.234.82.85:33965", "219.234.82.85:37299", "219.234.82.85:20747", "219.234.82.86:6666", "219.234.82.86:34106", "219.234.82.86:25301", "219.234.82.86:32896", "219.234.82.86:23034", "219.234.82.86:22685", "219.234.82.86:13078", "219.234.82.86:38770", "219.234.82.86:28402", "219.234.82.86:18887", "219.234.82.86:6588", "219.234.82.86:7292", "219.234.82.86:24268", "219.234.82.86:16472", "219.234.82.86:32597", "219.234.82.86:31122", "219.234.82.88:8817", "219.234.82.88:8160", "219.234.82.88:9239", "219.234.82.88:6133", "114.141.162.53:8080", "123.125.116.243:17656", "123.125.116.241:29156", "123.125.116.243:6938", "219.234.82.88:29484", "219.234.82.88:8084", "219.234.82.88:32229", "219.234.82.88:22758", "219.234.82.88:5616", "124.225.52.14:8080", "219.234.82.88:30028", "219.234.82.88:23685", "219.234.82.88:29037", "219.234.82.88:8755"]
|
11
12
|
|
12
13
|
# p TestGrabTvsou.new.get_channel_logo
|
13
|
-
p TestGrabTvmao.new.test_get_show_type_by_batch
|
14
|
+
# p TestGrabTvmao.new.test_get_show_type_by_batch
|
15
|
+
p TestGrabBase.new.test_proxy_list
|
14
16
|
end
|
data/lib/grabepg/grab_base.rb
CHANGED
@@ -29,14 +29,18 @@ module Grabepg
|
|
29
29
|
ret
|
30
30
|
end
|
31
31
|
|
32
|
+
def self.proxy_limit(limit,proxy_list)
|
33
|
+
return GetProxyList.get_proxy_in_time_limt(limit,proxy_list)
|
34
|
+
end
|
32
35
|
|
33
36
|
def self.proxy_list(path)
|
34
37
|
proxy_list = []
|
35
38
|
crt_date = DateTime.now.strftime('%F')
|
36
|
-
proxy_path = "%s/proxy/%s.txt" % [File.dirname(path),crt_date]
|
39
|
+
proxy_path = "%s/tasks/proxy/%s.txt" % [File.dirname(path),crt_date]
|
37
40
|
p "Proxy_Path: #{proxy_path}"
|
38
41
|
if File.exist?(proxy_path)
|
39
42
|
file_proxy = File.open(proxy_path,"r")
|
43
|
+
p "Write in file"
|
40
44
|
file_proxy.each_line {|line|
|
41
45
|
proxy_list << line.chomp.to_s
|
42
46
|
}
|
@@ -44,8 +48,11 @@ module Grabepg
|
|
44
48
|
file_proxy.flush
|
45
49
|
file_proxy.close
|
46
50
|
else
|
47
|
-
proxy_list=GetProxyList.get_list(ENV["proxy_limit"].to_i,ENV["proxy_page"].to_i)
|
48
|
-
|
51
|
+
#proxy_list=GetProxyList.get_list(ENV["proxy_limit"].to_i,ENV["proxy_page"].to_i)
|
52
|
+
proxy_list=["192.168.1.144:2222"]
|
53
|
+
dirpath = "#{File.dirname(path)}/tasks/proxy/"
|
54
|
+
p "**************************************************"
|
55
|
+
p "dirpath=#{dirpath}"
|
49
56
|
Dir.open(dirpath) {|fna|
|
50
57
|
fna.each do |fn|
|
51
58
|
if(fn.to_s != ".." && fn.to_s != ".")
|
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: 0.2.
|
4
|
+
version: 0.2.6
|
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-
|
11
|
+
date: 2013-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ! '"用于抓取EPG信息"'
|
14
14
|
email:
|