Skip to content

Commit ce0b711

Browse files
authored
Merge pull request #19 from fa0311/develop
v0.0.13
2 parents 6f01d10 + 7dec03d commit ce0b711

17 files changed

Lines changed: 52 additions & 48 deletions

File tree

example/.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"ms-python.vscode-pylance",
4+
"ms-python.python",
5+
"ms-python.debugpy",
6+
"charliermarsh.ruff"
7+
]
8+
}

example/.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"configurations": [
44
{
55
"name": "Python: Current File",
6-
"type": "python",
6+
"type": "debugpy",
77
"request": "launch",
88
"program": "${file}",
99
"console": "integratedTerminal",
1010
"justMyCode": false
1111
}
1212
]
13-
}
13+
}

example/.vscode/settings.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
2-
"flake8.args": [],
32
"editor.unicodeHighlight.ambiguousCharacters": false,
4-
"python.analysis.typeCheckingMode": "basic"
5-
}
3+
"python.analysis.typeCheckingMode": "basic",
4+
"editor.codeActionsOnSave": {
5+
"source.organizeImports": "explicit",
6+
"source.fixAll": "explicit"
7+
},
8+
}

example/requirements.txt

-4 Bytes
Binary file not shown.

example/sample/download_media.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1+
import os
2+
import urllib.request
3+
from pathlib import Path
4+
from typing import Optional
5+
6+
import login as login
17
from twitter_openapi_python import (
2-
TwitterOpenapiPython,
3-
TimelineTimelineCursor,
48
MediaExtended,
9+
TimelineTimelineCursor,
510
TweetApiUtilsData,
11+
TwitterOpenapiPython,
612
)
7-
from typing import Optional
8-
import login as login
9-
import urllib.request
10-
import os
11-
from pathlib import Path
12-
1313

1414
cookies_dict = login.login().get_cookies().get_dict()
1515
𝕏 = TwitterOpenapiPython().get_client_from_cookies(cookies=cookies_dict)

example/sample/login.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import json
2-
32
from pathlib import Path
4-
from tweepy_authlib import CookieSessionUserHandler
3+
54
from requests.cookies import RequestsCookieJar
5+
from tweepy_authlib import CookieSessionUserHandler
66

77

88
def login():

example/sample/tweet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import datetime
2-
from twitter_openapi_python import TwitterOpenapiPython
3-
import login as login
42

3+
import login as login
4+
from twitter_openapi_python import TwitterOpenapiPython
55

66
cookies_dict = login.login().get_cookies().get_dict()
77
𝕏 = TwitterOpenapiPython().get_client_from_cookies(cookies=cookies_dict)

example/sample/tweet_media.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
from twitter_openapi_python import TwitterOpenapiPython
2-
3-
41
import login as login
52
import tweepy
6-
3+
from twitter_openapi_python import TwitterOpenapiPython
74

85
auth_handler = login.login()
96
cookies_dict = auth_handler.get_cookies().get_dict()

example/sample/user.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
from twitter_openapi_python import TwitterOpenapiPython
2-
import login as login
3-
4-
5-
import urllib.request
6-
from urllib.parse import urlparse
71
import os
2+
import urllib.request
83
from pathlib import Path
4+
from urllib.parse import urlparse
5+
6+
import login as login
7+
from twitter_openapi_python import TwitterOpenapiPython
98

109
cookies_dict = login.login().get_cookies().get_dict()
1110
𝕏 = TwitterOpenapiPython().get_client_from_cookies(cookies=cookies_dict)

twitter_openapi_python/.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"configurations": [
44
{
55
"name": "Python: Current File",
6-
"type": "python",
6+
"type": "debugpy",
77
"request": "launch",
88
"program": "${file}",
99
"console": "integratedTerminal",
1010
"justMyCode": false
1111
}
1212
]
13-
}
13+
}

0 commit comments

Comments
 (0)