Skip to content

Commit eecee7f

Browse files
Merge pull request #2502 from avinashkranjan/deepsource-transform-d82dd3c1
format code with autopep8
2 parents 8ab7e0c + 9806cc4 commit eecee7f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Linkedin_Posts_Scrapper/Linkedin_Posts_Scrapper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import requests
22

3+
34
def get_linkedin_posts(access_token):
45
url = 'https://api.linkedin.com/v2/shares?q=owners&owners=urn:li:person:YOUR_USER_ID&count=10'
56
headers = {'Authorization': f'Bearer {access_token}'}
@@ -13,7 +14,9 @@ def get_linkedin_posts(access_token):
1314
post_text = post.get('text', '')
1415
print(post_text)
1516
else:
16-
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+
1720

1821
if __name__ == "__main__":
1922
# Replace YOUR_ACCESS_TOKEN and YOUR_USER_ID with appropriate values

0 commit comments

Comments
 (0)