baiduserp 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/baiduserp/version.rb +1 -1
- data/lib/parsers/ranks.rb +6 -1
- data/lib/parsers/result_num.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1138e5971b4ff973f8abd7096fe76997887f7f9d
|
4
|
+
data.tar.gz: 9582079945b7ad67a128107429927ea1831bbfb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e8e18d34e4820b2e1b7e2d55c23d15b562c5e8b14a7084c15657fe1dd718de50b35897c0e5642d551acb3e342a7b824e91eae462bcd8448c1a8944e30d3d174
|
7
|
+
data.tar.gz: dea624fc9c1231affe3d0a9e7344dc6ae325ab0c9b6f1c77ecd4caa9d8eff2909b1d911ab3f16574a453617683d759e7c0da92746370965b9bfae4814ec02b08
|
data/lib/baiduserp/version.rb
CHANGED
data/lib/parsers/ranks.rb
CHANGED
@@ -10,7 +10,12 @@ class Baiduserp::Parser
|
|
10
10
|
url = table.search('h3/a').first
|
11
11
|
unless url.nil?
|
12
12
|
url = url['href']
|
13
|
-
|
13
|
+
begin
|
14
|
+
url = Baiduserp::Client.get(url).headers['location'] if url.include?('http://www.baidu.com/link?')
|
15
|
+
rescue Exception
|
16
|
+
sleep(10)
|
17
|
+
retry
|
18
|
+
end
|
14
19
|
end
|
15
20
|
r[:url] = url
|
16
21
|
|
data/lib/parsers/result_num.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: baiduserp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MingQian Zhang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.0.
|
85
|
+
rubygems_version: 2.0.3
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Baidu SERP
|