myuniversaljobsmatch 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9aa5f6b90e8b5767466dffc713be7ec0292c3412
4
+ data.tar.gz: 26e96baa046bb40cb29e56e1fea21e2097876034
5
+ SHA512:
6
+ metadata.gz: 97b6bd231e57d6bccd8985db59a15cc8ecab0133cc846acaf99dff2f0303a78156ad872d2bd013632340b3dc1a868646fe81f260f02eb0976654d03b657fd140
7
+ data.tar.gz: ae4b8503ac5ef3549f3b42d5c693638aedaa2d013d9a886edcf2061ffcdb253e172297c42466eea26be54c56668f0b3b8df04fb8293fa4f2df5c3024318de9aa
checksums.yaml.gz.sig ADDED
Binary file
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'nokorexi'
4
+ require 'dynarex'
5
+
6
+ # file: myuniversaljobsmatch.rb
7
+
8
+ class MyUniversalJobsMatch
9
+
10
+ def initialize(filepath: '')
11
+
12
+ @filepath = filepath
13
+
14
+ end
15
+
16
+ def search(title: '', where: '')
17
+
18
+
19
+ url = "https://jobsearch.direct.gov.uk/jobsearch/" + \
20
+ "powersearch.aspx?qt=2&rad=20&tm=-1&where=#{where}" + \
21
+ "&tjt=#{title}"
22
+ doc = Nokorexi.new(url).to_doc
23
+
24
+ table = doc.root.at_css('.JSresults')
25
+ a = table.xpath('tr[td]').map do |row|
26
+
27
+ # get the date
28
+ date = row.element('td/span/text()')
29
+ link = row.element('td[3]/a')
30
+ title = link.text
31
+ url = link.attributes[:href]
32
+ company = row.element('td[4]/span/text()')
33
+ location = row.element('td[5]/span/text()')
34
+
35
+ [date, title, url, company, location]
36
+
37
+ end
38
+
39
+ dx = Dynarex.new('vacancies[title, desc, date, time, tags, xslt]/vacancy' \
40
+ + '(date, title, url, company, location, created_at)')
41
+
42
+ dx.default_key = 'uid'
43
+
44
+ dx.title = "Universal Jobmatch jobs - Search results for '#{title}'"
45
+ dx.desc = "generated from web scrape of jobsearch.direct.gov.uk; source: " + url
46
+ dx.tags = 'jobs vacancies jobmatch ' + title.split.first
47
+ dx.date = Time.now.strftime("%Y-%b-%s")
48
+ dx.time = Time.now.strftime("%H:%M")
49
+
50
+ a.each do |row|
51
+ dx.create Hash[%i(date title url company location created_at).zip(row)]
52
+ end
53
+
54
+ return dx
55
+ end
56
+ end
data.tar.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ � �^��Q����3s�u����\��D��$J%�8E����/�f�U��4x�'=����k8�|x�"
2
+ R� ����
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: myuniversaljobsmatch
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - James Robertson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
+ YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
+ 8ixkARkWAmV1MB4XDTE1MTAzMDE5MDUyOVoXDTE2MTAyOTE5MDUyOVowSDESMBAG
16
+ A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
+ EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
+ ggEBALnN0DGzxMr1RS3uyc4wB0Ess1trLgrGnGW41zE13z8F2mg2QbGa6HHBp5iX
19
+ 5AaXcU7eYrDKS/G7xqvtO39wK0UOIjzyMkslIhKWwXNGYepBgW5qqWJeHUfE+VOB
20
+ xr2DYN1leYfpDT5Bn6BdjBUsidFYZAXvWSEHTDGEET9qYbNKowX7JUcAx0cvLHI3
21
+ EWXKMhgds9y4NsdsWe+g4JPMno6MZK2YhRf919lRPewI0dN8zzPF319axPAcm4hi
22
+ OhLkhbd4B+ty3YDXS5ymalS75Uu6e1f2N95b5t/kFTYxY69BPIf5Jetr4tFvpdLQ
23
+ d1JEaxqU+hMc2uMJSs6LFC0zzy8CAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
24
+ DwQEAwIEsDAdBgNVHQ4EFgQUxYAdth73E+YrP/XC/vdEe1VqKpkwJgYDVR0RBB8w
25
+ HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
26
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAXMV2uFIW
27
+ ivDSv0+CNzLZQ/Fvl5lZdQiZYBtsPf4OMksOOvPDeAgMEwF/zY2vV42U8lfxLhWL
28
+ eX9rnj5NqDi0iiQGGoe2Ll48De+ncW1XXMCrYMRGC0NvDaRQWkt8jS4BZGUQ90w0
29
+ EhcOzq3yRJWoOW3b+gD2Hx2XKfZaU8kBPNPkmIpYJub54poX6h5Q2+jaCXK9+1ud
30
+ U19LM1WasggAzZ+n9k04JXF55tczgxcLAqYi5FLtirfPGw+BMR0V6vkmi9wO34aC
31
+ jHrZ/AIDgLLmudfb7i81aMDjHuqydLyQWygvDL1WkxEnWBYJGA+AKRmy2QwoEBlI
32
+ knQ6nx6YBqnerg==
33
+ -----END CERTIFICATE-----
34
+ date: 2015-10-30 00:00:00.000000000 Z
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: dynarex
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '1.5'
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 1.5.41
46
+ type: :runtime
47
+ prerelease: false
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '1.5'
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 1.5.41
56
+ - !ruby/object:Gem::Dependency
57
+ name: nokorexi
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '0.3'
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: 0.3.1
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - "~>"
71
+ - !ruby/object:Gem::Version
72
+ version: '0.3'
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 0.3.1
76
+ description:
77
+ email: james@r0bertson.co.uk
78
+ executables: []
79
+ extensions: []
80
+ extra_rdoc_files: []
81
+ files:
82
+ - lib/myuniversaljobsmatch.rb
83
+ homepage: https://github.com/jrobertson/myuniversaljobsmatch
84
+ licenses:
85
+ - MIT
86
+ metadata: {}
87
+ post_install_message:
88
+ rdoc_options: []
89
+ require_paths:
90
+ - lib
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ requirements: []
102
+ rubyforge_project:
103
+ rubygems_version: 2.4.8
104
+ signing_key:
105
+ specification_version: 4
106
+ summary: A web scraper which searches for job adverts on jobsearch.direct.gov.uk
107
+ test_files: []
metadata.gz.sig ADDED
Binary file