We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8e50f7 commit 9806cc4Copy full SHA for 9806cc4
Linkedin_Posts_Scrapper/Linkedin_Posts_Scrapper.py
@@ -1,5 +1,6 @@
1
import requests
2
3
+
4
def get_linkedin_posts(access_token):
5
url = 'https://api.linkedin.com/v2/shares?q=owners&owners=urn:li:person:YOUR_USER_ID&count=10'
6
headers = {'Authorization': f'Bearer {access_token}'}
@@ -13,7 +14,9 @@ def get_linkedin_posts(access_token):
13
14
post_text = post.get('text', '')
15
print(post_text)
16
else:
- print(f"Error: {response.status_code} - {data.get('message', 'Unknown error')}")
17
+ print(
18
+ f"Error: {response.status_code} - {data.get('message', 'Unknown error')}")
19
20
21
if __name__ == "__main__":
22
# Replace YOUR_ACCESS_TOKEN and YOUR_USER_ID with appropriate values
0 commit comments