<commit_before># -*- coding: utf-8 -*-
# !/usr/bin/python
from bs4 import BeautifulSoup
import requests

import mavri

xx = mavri.login('tr.wikipedia', 'Mavrikant')
content = requests.get(
    'https://tr.wikipedia.org/w/index.php?title=%C3%96zel:BekleyenDe%C4%9Fi%C5%9Fiklikler&dir=prev&limit=500',
    cookies=xx.cookies).text
soup = BeautifulSoup(content, 'html.parser')

RAPOR = '{| class="wikitable sortable"\n|-\n! Sayfa !! Damaging !! Reverted'

for line in soup.find("div", {"id": "mw-content-text"}).ul.find_all('li'):
    incele = line.find_all('a')[2].get('href')
    title = line.find_all('a')[0].get('title')
    incele_text = requests.get('https://tr.wikipedia.org' + incele, cookies=xx.cookies).text

    if incele_text.find('diff-multi') == -1:
        diff = incele_text.split('<input id="mw-fr-input-oldid" type="hidden" value="')[1].split('"')[0]
        print title
        # print diff
        damaging = \
            requests.get('http://ores.wmflabs.org/scores/trwiki/damaging/' + str(diff)).json()[str(diff)][
                'probability'][
                'true'] * 100
        reverted = \
            requests.get('http://ores.wmflabs.org/scores/trwiki/reverted/' + str(diff)).json()[str(diff)][
                'probability'][
                'true'] * 100
        # print damaging
        # print reverted
        RAPOR += '\n|-\n| [https://tr.wikipedia.org' + incele + ' ' + title + '] || ' + str(damaging).replace('.',
                                                                                                              ',') + ' || ' + str(
            reverted).replace('.', ',')

RAPOR += '\n|}'

print mavri.change_page('tr.wikipedia', 'Kullanıcı:Mavrikant/ORES', RAPOR, 'ORES', xx).text
exit(0)<commit_msg>hepsini tara<commit_after># -*- coding: utf-8 -*-
# !/usr/bin/python
from bs4 import BeautifulSoup
import requests
import mavri

xx = mavri.login('tr.wikipedia', 'Mavrikant')
RAPOR = '{| class="wikitable sortable"\n|-\n! Sayfa !! Damaging !! Reverted'
trwiki = 'https://tr.wikipedia.org'
nextpage = '/w/index.php?title=%C3%96zel:BekleyenDe%C4%9Fi%C5%9Fiklikler&limit=100'
while nextpage != 'DONE':
    soup = BeautifulSoup(requests.get(trwiki + nextpage, cookies=xx.cookies).text, 'html.parser')
    try:
        nextpage = soup.findAll("a", {"class": "mw-nextlink"})[0].get('href')
    except:
        nextpage = 'DONE'

    for line in soup.find("div", {"id": "mw-content-text"}).ul.find_all('li'):
        incele = line.find_all('a')[2].get('href')
        title = line.find_all('a')[0].get('title')
        incele_text = requests.get(trwiki + incele, cookies=xx.cookies).text

        if incele_text.find('diff-multi') == -1:
            diff = incele_text.split('<input id="mw-fr-input-oldid" type="hidden" value="')[1].split('"')[0]
            print title
            # print diff
            damaging = \
                requests.get('http://ores.wmflabs.org/scores/trwiki/damaging/' + str(diff)).json()[str(diff)][
                    'probability'][
                    'true'] * 100
            reverted = \
                requests.get('http://ores.wmflabs.org/scores/trwiki/reverted/' + str(diff)).json()[str(diff)][
                    'probability'][
                    'true'] * 100
            # print damaging
            # print reverted
            RAPOR += '\n|-\n| [https://tr.wikipedia.org' + incele + ' ' + title + '] || ' + str(damaging).replace('.',
                                                                                                                  ',') + ' || ' + str(
                reverted).replace('.', ',')

RAPOR += '\n|}'

print mavri.change_page('tr.wikipedia', 'Kullanıcı:Mavrikant/ORES', RAPOR, 'ORES', xx).text
exit(0)
{'fraction_non_alphanumeric': 0.1897986577181208, 'fraction_numerical': 0.013154362416107382, 'mean_word_length': 2.1928020565552697, 'pattern_counts': {'":': 3, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5486444', 'n_tokens_mistral': 1284, 'n_tokens_neox': 1228, 'n_words': 187}