tsjobcrawler 0.1.2 → 0.1.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f61cfc63f1645221d7346792579a958cf22df40
|
4
|
+
data.tar.gz: 985c42f6a4f2ce6f207d8d4f3f773738f3cf02ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe1856420422090a2787f22cff70d71ca7a6ee32a0404b80b09d61297385e964a3d1ab8a3f1f66eae142f8cb1c704596e48d9d548b49dad4056b7ba6ab932497
|
7
|
+
data.tar.gz: d347d928ef2214ad4a0364e801a99b7d113d42baa15a509a947fcc7f60d98414907c2be4ae66ddaac83789211a7bde25f22f0a6f1471692de48564d3063abefc
|
@@ -24,7 +24,7 @@ class ClearanceJobsComCrawler
|
|
24
24
|
# Run the crawler
|
25
25
|
def crawl
|
26
26
|
page_count = get_page_count
|
27
|
-
|
27
|
+
|
28
28
|
(1..page_count).each do |page_num|
|
29
29
|
listing_links = collect_links_on_page(get_next_page(page_num))
|
30
30
|
parse_listings(listing_links)
|
@@ -36,13 +36,17 @@ class ClearanceJobsComCrawler
|
|
36
36
|
if @search_term == nil
|
37
37
|
@base_url = "https://www.clearancejobs.com/jobs?"
|
38
38
|
else
|
39
|
-
@base_url = "https://www.clearancejobs.com/jobs?keywords="+CGI.escape(@search_term)
|
39
|
+
@base_url = "https://www.clearancejobs.com/jobs?keywords="+CGI.escape(@search_term)
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
43
|
# Get the URL for the next page
|
44
44
|
def get_next_page_url(page_num)
|
45
|
-
|
45
|
+
if @base_url.include?("keywords")
|
46
|
+
return @base_url+"&PAGE="+page_num.to_s+"&limit=25"
|
47
|
+
else
|
48
|
+
return @base_url+"PAGE="+page_num.to_s+"&limit=25"
|
49
|
+
end
|
46
50
|
end
|
47
51
|
|
48
52
|
# Get the page
|
@@ -76,7 +76,7 @@ class ClearedJobsNetCrawler
|
|
76
76
|
found_listings.push(parser.parse_job)
|
77
77
|
end
|
78
78
|
|
79
|
-
@reporter.report_results(found_listings, listing_links.first)
|
79
|
+
@reporter.report_results(found_listings, listing_links.first[:url])
|
80
80
|
end
|
81
81
|
|
82
82
|
# Gets the number of pages for the query
|
data/lib/tsjobcrawler.rb
CHANGED
data/tsjobcrawler.gemspec
CHANGED