Esempio n. 1
0
    def get_categoryinfo(self):
        prop = 'categoryinfo'
        self.payload['prop'] = prop

        ci_list = helpers._fetch_dict_results(self.base_url, self.payload,
                                              self.headers, prop)

        self.payload.pop('cicontinue', None)
        self.payload['prop'] = None
        return ci_list
Esempio n. 2
0
    def get_contributors(self, pclimit="max"):
        prop = 'contributors'
        self.payload['prop'] = prop
        self.payload['pclimit'] = pclimit

        pc_list = helpers._fetch_dict_results(self.base_url, self.payload,
                                              self.headers, prop)

        self.payload.pop('pccontinue', None)
        self.payload.pop('pclimit', None)
        self.payload['prop'] = None
        return pc_list
Esempio n. 3
0
    def get_categories(self, get_hidden=False):
        prop = 'categories'
        self.payload['clshow'] = 'hidden' if get_hidden else '!hidden'
        self.payload['prop'] = prop

        cat_list = helpers._fetch_dict_results(self.base_url, self.payload,
                                               self.headers, prop)

        self.payload.pop('clcontinue', None)
        self.payload.pop('clshow', None)
        self.payload['prop'] = None
        return cat_list
Esempio n. 4
0
    def get_links(self, pllimit="max", pldir="ascending"):
        prop = 'links'
        self.payload['prop'] = prop
        self.payload['pllimit'] = pllimit
        self.payload['pldir'] = pldir

        pl_list = helpers._fetch_dict_results(self.base_url, self.payload,
                                              self.headers, prop)

        self.payload.pop('plcontinue', None)
        self.payload.pop('pllimit', None)
        self.payload.pop('pldir', None)
        self.payload['prop'] = None
        return pl_list
Esempio n. 5
0
    def get_linkshere(self, lhprop="pageid|title|redirect", lhlimit="max"):
        prop = 'linkshere'
        self.payload['prop'] = prop
        self.payload['lhprop'] = lhprop
        self.payload['lhlimit'] = lhlimit

        lh_list = helpers._fetch_dict_results(self.base_url, self.payload,
                                              self.headers, prop)

        self.payload.pop('lhcontinue', None)
        self.payload.pop('lhprop', None)
        self.payload.pop('lhlimit', None)
        self.payload['prop'] = None
        return lh_list
Esempio n. 6
0
    def get_images(self, imlimit='max', imdir='ascending'):
        prop = 'images'
        self.payload['prop'] = prop,
        self.payload['imlimit'] = imlimit,
        self.payload['imdir'] = imdir

        im_list = helpers._fetch_dict_results(self.base_url, self.payload,
                                              self.headers, prop)

        self.payload.pop('imcontinue', None)
        self.payload.pop('imlimit', None)
        self.payload.pop('imdir', None)
        self.payload['prop'] = None
        return im_list
Esempio n. 7
0
    def get_redirects(self, rdlimit="max", rdprop="pageid|title"):
        prop = 'redirects'
        self.payload['prop'] = prop
        self.payload['rdlimit'] = rdlimit
        self.payload['rdprop'] = rdprop

        rd_list = helpers._fetch_dict_results(self.base_url, self.payload,
                                              self.headers, prop)

        self.payload.pop('rdcontinue', None)
        self.payload.pop('rdlimit', None)
        self.payload.pop('rdprop', None)
        self.payload['prop'] = None
        return rd_list
Esempio n. 8
0
    def get_duplicatefiles(self,
                           dflimit="max",
                           dfdir="ascending",
                           dflocalonly=False):
        prop = 'duplicatefiles'
        self.payload['prop'] = prop
        self.payload['dflimit'] = dflimit
        self.payload['dfdir'] = dfdir
        if dflocalonly:
            self.payload['dflocalonly'] = True

        df_list = helpers._fetch_dict_results(self.base_url, self.payload,
                                              self.headers, prop)

        self.payload.pop('dfcontinue', None)
        self.payload.pop('dflimit', None)
        self.payload.pop('dfdir', None)
        self.payload.pop('dflocalonly', None)
        self.payload['prop'] = None
        return df_list
Esempio n. 9
0
    def get_fileusage(self,
                      fuprop="pageid|title|redirect",
                      fulimit="max",
                      funamespace="*",
                      fushow="!redirect"):
        prop = 'fileusage'
        self.payload['prop'] = prop
        self.payload['fuprop'] = fuprop
        self.payload['fulimit'] = fulimit
        self.payload['fushow'] = fushow
        self.payload['funamespace'] = funamespace

        fu_list = helpers._fetch_dict_results(self.base_url, self.payload,
                                              self.headers, prop)

        self.payload.pop('fuprop', None)
        self.payload.pop('fulimit', None)
        self.payload.pop('fushow', None)
        self.payload.pop('funamespace', None)
        self.payload.pop('fucontinue', None)
        self.payload['prop'] = None
        return fu_list