Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F36995582
T336624.py
Platonides (platonides)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
Platonides
May 13 2023, 9:18 PM
2023-05-13 21:18:32 (UTC+0)
Size
346 B
Referenced Files
None
Subscribers
None
T336624.py
View Options
#!/usr/bin/env python3
import
sys
import
requests
from
requests_oauthlib
import
OAuth1
test_url
=
sys
.
argv
[
1
]
if
len
(
sys
.
argv
)
>
1
else
'https://en.wikipedia.org/wiki/Main%20Page'
r1
=
requests
.
get
(
test_url
,
auth
=
OAuth1
(
''
,
''
,
''
,
''
))
r2
=
requests
.
get
(
test_url
,
auth
=
None
)
print
(
f
"{r1.url}, {r1.history}"
)
print
(
f
"{r2.url}, {r2.history}"
)
File Metadata
Details
Attached
Mime Type
text/x-python
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10827159
Default Alt Text
T336624.py (346 B)
Attached To
Mode
T336624: MediaWiki does not redirect URL with OAuth credentials supplied
Attached
Detach File
Event Timeline
Log In to Comment