tsjobcrawler 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e3f6250a7166454a932e73e396ff6b222539335
|
4
|
+
data.tar.gz: 3d678c8e26039c508bb7242897f797106747f1db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 883df8e83300ea335c4777af8bed514c2d9ae67a0c8262e337323471608e91b08ba8da3e4de4e8b6f7e9e77efd88e8cb30f74ef068dfb66a796e785904f883d2
|
7
|
+
data.tar.gz: 86b0a0ce0ddb2b8a2e06bfa3af7c84d8e1adc8919189f0b5ba93f323ff66f535db0ec49487f5e78c1b319227bc4cb521f5e8e6079957dfccddfedd0737821203
|
@@ -76,7 +76,9 @@ class ClearedJobsNetCrawler
|
|
76
76
|
found_listings.push(parser.parse_job)
|
77
77
|
end
|
78
78
|
|
79
|
-
|
79
|
+
# Report results
|
80
|
+
listing_url = listing_links.first[:url] if !listing_links.empty?
|
81
|
+
@reporter.report_results(found_listings, listing_url)
|
80
82
|
end
|
81
83
|
|
82
84
|
# Gets the number of pages for the query
|
@@ -119,15 +121,20 @@ class ClearedJobsNetCrawler
|
|
119
121
|
return get_page(url)
|
120
122
|
end
|
121
123
|
|
124
|
+
# Escape the term in a way that works with the URL
|
125
|
+
def escape_term(term)
|
126
|
+
CGI.escape(term).gsub("%2F", "_/_")
|
127
|
+
end
|
128
|
+
|
122
129
|
# Get the base query url depending on type
|
123
130
|
def get_base_query_url
|
124
131
|
if @crawl_type == "all"
|
125
132
|
return @base_url+"search/action/advanced_search/zip_radius/20/keywords/+/city_state_zip/+/security_clearance/+/submit/SEARCH+JOBS/sort/time"
|
126
133
|
elsif @crawl_type == "search"
|
127
|
-
encoded_term =
|
134
|
+
encoded_term = escape_term(@search_term)
|
128
135
|
return @base_url+"search/action/advanced_search/zip_radius/20/keywords/"+encoded_term+"/city_state_zip/+/security_clearance/+/submit/SEARCH+JOBS"
|
129
136
|
elsif @crawl_type == "filter"
|
130
|
-
encoded_term =
|
137
|
+
encoded_term = escape_term(@search_term)
|
131
138
|
return @base_url+"search/action/advanced_search/keywords/+/"+@filter+"[]/"+encoded_term+"/zip/+/zip_radius/20"
|
132
139
|
elsif @crawl_type == "company_page"
|
133
140
|
return @base_url+"view-employer/employer_id_seo/"+@search_term
|
data/tsjobcrawler.gemspec
CHANGED