upton 0.2.4 → 0.2.5
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/lib/upton.rb +6 -3
- data/lib/utils.rb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDViNTI2OTFlMzA1YmZlYjhlN2ZiOTdhYzcxYmQ0M2FjY2Q3M2UwMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Yzc3ZWE1NGVjNzUxMDVkMjgzN2YwZDNlYzc4MDJmOWI5YjdkMWNhMQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTJjYTVkNDk1NThkOTQwOWMyOTM3YTQ3ZjY3NWQyMTAwOWNlZGQxN2MwODJi
|
10
|
+
MDE2NDc2NmRkOWU0ZDk2ZDc0ZmRhMmIwODJiNjFkNTE2N2VmZjc3YWM3MTFj
|
11
|
+
MWMyN2FjNzEyOTI1YjJkYTgyYzBhNjQ1Zjk1NmM4NTMwNzgyZmU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmJkMWYwYjQzZGY2YjdmMDIyMjM3ODQwYzE0MWU5Y2E3OGU3ODEwNWMyNWM2
|
14
|
+
ZDZkMWJmMzhjYjcwMmM0MTg3M2U5YWRmY2FhODNlODI5OWY2NzRmNmNmNTFk
|
15
|
+
NjBlM2IzNzQwN2I0OTkwMDRkODE3OThlYTJhMDExNmRlNWM5Mzg=
|
data/lib/upton.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
|
3
|
-
|
4
3
|
require 'nokogiri'
|
5
4
|
require 'uri'
|
6
5
|
require 'restclient'
|
7
6
|
require './lib/utils'
|
8
7
|
|
8
|
+
##
|
9
|
+
# This module contains a scraper called Upton
|
10
|
+
##
|
9
11
|
module Upton
|
10
12
|
##
|
11
13
|
# *Upton* is a framework for easy web-scraping with a useful debug mode
|
@@ -48,8 +50,9 @@ module Upton
|
|
48
50
|
##
|
49
51
|
# +index_url_or_array+: A list of string URLs, OR
|
50
52
|
# the URL of the page containing the list of instances.
|
51
|
-
# +selector+: The XPath or CSS that specifies the
|
52
|
-
# the page, if a url is specified for
|
53
|
+
# +selector+: The XPath expression or CSS selector that specifies the
|
54
|
+
# anchor elements within the page, if a url is specified for
|
55
|
+
# the previous argument.
|
53
56
|
# +selector_method+: +:xpath+ or +:css+. By default, +:xpath+.
|
54
57
|
#
|
55
58
|
# These options are a shortcut. If you plant to override +get_index+, you
|
data/lib/utils.rb
CHANGED