Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
P
projet i2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Samy Haffoudhi
projet i2
Commits
6716798f
Commit
6716798f
authored
Jan 20, 2022
by
Tanguy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Linkedin c'est le BAZAR
parent
162d3112
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
0 deletions
+61
-0
SheetsClient.py
drive/SheetsClient.py
+6
-0
LinkedinCient.py
linkedin/LinkedinCient.py
+49
-0
curl_ex.sh
linkedin/curl_ex.sh
+3
-0
curl_ex2.sh
linkedin/curl_ex2.sh
+3
-0
No files found.
drive/SheetsClient.py
View file @
6716798f
...
...
@@ -20,16 +20,22 @@ SCOPES = ['https://www.googleapis.com/auth/spreadsheets']
SPREADSHEET_ID
=
'1Rf_AmrKNkol--kKtWYJLHVYzL1ffTcpSjfuaSahRZx0'
creds
=
service_account
.
Credentials
.
from_service_account_file
(
'token.json'
,
scopes
=
SCOPES
)
try
:
service
=
build
(
'sheets'
,
'v4'
,
credentials
=
creds
)
sheet
=
service
.
spreadsheets
()
body
=
{
"values"
:
values
}
result
=
sheet
.
values
()
.
update
(
spreadsheetId
=
SPREADSHEET_ID
,
range
=
"A2:N"
+
str
(
s1
),
valueInputOption
=
"USER_ENTERED"
,
body
=
body
)
.
execute
()
print
(
result
)
except
HttpError
as
err
:
print
(
err
)
linkedin/LinkedinCient.py
0 → 100644
View file @
6716798f
import
requests
EMAIL
=
"luc.paluche@protonmail.com"
PASSWORD
=
"r3sp0DSI"
class
LinkedinClient
:
def
cne
():
return
LinkedinClient
(
"centrale-nantes-etudes"
)
def
__init__
(
self
,
company
):
self
.
company
=
company
self
.
session
=
requests
.
Session
()
def
initFetcher
(
self
):
headers
=
{
"User-Agent"
:
"Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0"
,
"Accept"
:
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"
,
"Accept-Language"
:
"en-US,en;q=0.5"
,
"Accept-Encoding"
:
"gzip, deflate, br"
,
"Referer"
:
"https://www.google.com"
,
"DNT"
:
"1"
,
"Connection"
:
"keep-alive"
,
"Upgrade-Insecure-Requests"
:
"1"
,
"Sec-Fetch-Dest"
:
"document"
,
"Sec-Fetch-Mode"
:
"navigate"
,
"Sec-Fetch-Site"
:
"cross-site"
,
"Sec-Fetch-User"
:
"?1"
}
self
.
session
.
headers
=
headers
page
=
self
.
session
.
get
(
"https://fr.linkedin.com/company/"
+
self
.
company
)
.
text
print
(
page
)
#https://www.linkedin.com/voyager/api/organization/updatesV2?companyIdOrUniversalName=1733557&count=10&moduleKey=ORGANIZATION_MEMBER_FEED_DESKTOP&numComments=0&numLikes=0&paginationToken=955123001-1642231846543-4da3900150c8782b9d457efae7b9a681&q=companyRelevanceFeed&start=3
#url = "https://www.linkedin.com/company/" + self.company + "/posts"
#params = {"feedview" : "all"}
url
=
"https://www.linkedin.com/voyager/api/organization/updatesV2"
params
=
{
"companyIdOrUniversalName"
:
1733557
,
"count"
:
10
,
"moduleKey"
:
"ORGANIZATION_MEMBER_FEED_DESKTOP"
,
"numComments"
:
0
,
"numLikes"
:
0
,
"q"
:
"companyRelevanceFeed"
,
"start"
:
0
}
#print(self.session.get(url, params=params).text)
cne
=
LinkedinClient
.
cne
()
cne
.
initFetcher
()
linkedin/curl_ex.sh
0 → 100755
View file @
6716798f
#!/bin/bash
curl
'https://fr.linkedin.com/company/centrale-nantes-etudes'
-H
'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0'
-H
'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8'
-H
'Accept-Language: en-US,en;q=0.5'
-H
'Accept-Encoding: gzip, deflate, br'
-H
'Referer: https://www.google.com/'
-H
'DNT: 1'
-H
'Connection: keep-alive'
-H
'Upgrade-Insecure-Requests: 1'
-H
'Sec-Fetch-Dest: document'
-H
'Sec-Fetch-Mode: navigate'
-H
'Sec-Fetch-Site: cross-site'
-H
'Sec-Fetch-User: ?1'
--compressed
linkedin/curl_ex2.sh
0 → 100755
View file @
6716798f
#!/bin/bash
curl
'https://fr.linkedin.com/company/centrale-nantes-etudes'
-H
'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0'
-H
'Referer: https://www.google.com/'
--compressed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment