20240212-Linkedin-Private-Api

思路:先用playwright 取得cookies,觀察network直接打API

先取得 geoid (地點id)

q_keywords = "software engineer"
q_location = "taiwan"
r = requests.get(f"https://www.linkedin.com/jobs/search?keywords={q_keywords}&location={q_location}&trk=public_jobs_jobs-search-bar_search-submit")
soup = BeautifulSoup(r.text, "html.parser")
geo_id_inputs = soup.select("input[name='geoId']")
geoid = geo_id_inputs[0].get("value")
start_n = 0
job_search_link = f"https://www.linkedin.com/voyager/api/voyagerJobsDashJobCards?decorationId=com.linkedin.voyager.dash.deco.jobs.search.JobSearchCardsCollection-192&count=25&q=jobSearch&query=(origin:JOB_SEARCH_PAGE_SEARCH_BUTTON,keywords:software%20engineer,locationUnion:(geoId:{geoid}),spellCorrectionEnabled:true)&start={start_n}"
headers = [{
'Authority': 'www.linkedin.com',
'Method': 'GET',
'Scheme': 'https',
'Accept': 'application/vnd.linkedin.normalized+json+2.1',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-US,en;q=0.9',
'Cookie': "; ".join([f"{key}={value}" for key, value in session.cookies.items()]),
'Csrf-Token': session.cookies.get('JSESSIONID').strip('"'),
'User-Agent': 'OOOO',
'X-Li-Track': 'OOOO'
} for session in [s]]

r = s.get(job_search_link,headers=headers[0])

後記:結果發現github有人做了 linkedin apiQQ,當作練習吧 - https://github.com/tomquirk/linkedin-api -

from linkedin_api import Linkedin

api = Linkedin('acc', 'pass')

profile = api.get_profile('alanhc316')

contact_info = api.get_profile_contact_info('username')

connections = api.get_profile_connections('username')

Ref

20240211-Taiwan-Job-Insights

網頁互動版

  • 資料來源:Levels Fyi

台灣

在台灣 軟體工程師 做什麼最賺錢?

https://i.imgur.com/GHvjK50.png Android先猜應該是因為Google的關係拉高平均,Testing有點意外,Backend也是常常被提到成長幅度較大的,Networking先猜應該是網通廠MTK之類的。 AI 天花板高一點,但整體比做產品、嵌入式系統低。

20240209-Job-Insights

system design

1. Scope the problem

  • 可以知道現在有什麼工作機會、該公司位於總體的薪水級距
  • 可以知道最近就業市場中需要的工作技能
  • 如何讓自己更搶手、薪水更高?
    • 技能vs薪水級距

2. Reasonable Assumptions

  • 雇主資料每天會更新一次
  • 刪除大於半年以上的 job
  • 高價值產業、薪水頻繁更新,其餘不一定

3. Key Component

探索資料

  • Taiwan 資料:[[20240211-taiwan-job-insights]]

全球

找地區

0%