Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P53919
(An Untitled Masterwork)
Active
Public
Actions
Authored by
klausman
on Nov 28 2023, 11:12 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F41543015: raw-paste-data.txt
Nov 28 2023, 11:12 AM
2023-11-28 11:12:29 (UTC+0)
Subscribers
None
>>>
import
requests
>>>
url
=
'http://api-ro.discovery.wmnet/api/rest_v1/page/summary/Clandonald'
>>>
headers
=
{
'Host'
:
'en.wikipedia.org'
}
>>>
r
=
requests
.
get
(
url
,
headers
=
headers
)
>>>
print
(
r
.
text
)
<
!
DOCTYPE
html
>
<
html
lang
=
"en"
dir
=
"ltr"
>
<
meta
charset
=
"utf-8"
>
<
title
>
Not
Found
</
title
>
<
link
rel
=
"shortcut icon"
href
=
"/favicon.ico"
>
<
style
>
*
{
margin
:
0
;
padding
:
0
;
}
body
{
background
:
#fff; color: #202122; font: 0.938em/1.6 sans-serif; }
.
content
{
margin
:
7
%
auto
0
;
padding
:
2
em
1
em
1
em
;
max
-
width
:
640
px
;
}
img
{
float
:
left
;
margin
:
0
2
em
2
em
0
;
}
a
img
{
border
:
0
;
}
h1
{
margin
-
top
:
1
em
;
font
-
size
:
1.2
em
;
}
p
{
margin
:
0.7
em
0
1
em
0
;
}
a
{
color
:
#36c; text-decoration: none; }
a
:
hover
{
text
-
decoration
:
underline
;
}
em
{
color
:
#72777d; font-style: normal; }
</
style
>
<
div
class
=
"content"
role
=
"main"
>
<
a
href
=
"https://www.wikimedia.org"
><
img
src
=
"https://www.wikimedia.org/static/images/wmf.png"
srcset
=
"https://www.wikimedia.org/static/images/wmf-2x.png 2x"
alt
=
Wikimedia
width
=
135
height
=
135
></
a
>
<
h1
>
Page
not
found
</
h1
>
<
p
><
em
>/
api
/
rest_v1
/
page
/
summary
/
Clandonald
</
em
></
p
>
<
p
>
We
could
not
find
the
above
page
on
our
servers
.</
p
>
<
p
><
b
>
Did
you
mean
:
<
a
href
=
"/wiki/api/rest_v1/page/summary/Clandonald"
>/
wiki
/
api
/
rest_v1
/
page
/
summary
/
Clandonald
</
a
></
b
></
p
>
<
p
style
=
"clear:both;"
>
Alternatively
,
you
can
visit
the
<
a
href
=
"/"
>
Main
Page
</
a
>
or
read
<
a
href
=
"https://en.wikipedia.org/wiki/HTTP_404"
title
=
"Wikipedia: HTTP 404"
>
more
information
</
a
>
about
this
type
of
error
.</
p
>
</
div
>
</
html
>
>>>
Event Timeline
klausman
created this paste.
Nov 28 2023, 11:12 AM
2023-11-28 11:12:29 (UTC+0)
klausman
updated the paste's language from
autodetect
to
python
.
Log In to Comment