Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F9185194
Check a page on every wikinews
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Framawiki
Aug 27 2017, 9:27 AM
2017-08-27 09:27:40 (UTC+0)
Size
531 B
Referenced Files
None
Subscribers
None
Check a page on every wikinews
View Options
#!/usr/bin/env python
#-*- coding:utf-8 -*-
from
__future__
import
unicode_literals
,
print_function
import
requests
from
time
import
sleep
list
=
requests
.
get
(
'https://noc.wikimedia.org/conf/wikinews.dblist'
)
.
text
for
i
in
list
.
split
(
'
\n
'
):
lien
=
'http://
%s
.wikinews.org/wiki/Special:NewsFeed'
%
i
[:
2
]
print
(
'
\n
'
+
lien
)
req
=
requests
.
get
(
lien
)
assert
req
.
status_code
==
200
if
len
(
req
.
text
)
<
500
:
print
(
'bad (
%s
)'
%
len
(
req
.
text
))
else
:
print
(
'good (
%s
)'
%
len
(
req
.
text
))
sleep
(
5
)
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4883892
Default Alt Text
Check a page on every wikinews (531 B)
Attached To
Mode
P5925 Check a page on every wikinews
Attached
Detach File
Event Timeline
Log In to Comment