Last active
July 16, 2018 08:24
-
-
Save dvas0004/1ad8e64fe13577e9ab69c19a733820b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import urllib | |
from datetime import datetime | |
queries = ['react', 'angular', 'java', 'python', 'linux', 'machine learning', 'nodeJS', 'sql', 'full stack', 'microsoft, active directory', 'aws', 'ethereum,bitcoin', 'blockchain', 'scrum,agile', 'android', 'ios,xcode', 'devops', 'php', 'laravel', 'elasticsearch', 'mongodb', 'golang', 'oscp,cissp', 'neural network', 'postgres,postresql', '.net', 'ruby', 'macos'] | |
for query in queries: | |
filename = '/tmp/Estonia/Job Market Eval/{}.csv'.format(query.replace(',','_')) | |
query_parts = query.split(',') | |
url_query = '/q-'.join(query_parts) | |
encoded_url_query = urllib.quote(url_query, safe='') | |
r=requests.get('https://www.cv.ee/services/xhtml/?referer=https%3A%2F%2Fwww.cv.ee%2Fenglish%2F&module=frontpagecount&value=https%3A%2F%2Fwww.cv.ee%2Fjob-ads%2Fq-{}'.format(encoded_url_query)) | |
with open(filename, "a+") as historical_file: | |
historical_file.write("{},{}\n".format(str(datetime.today()), r.text)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment