Created
February 28, 2012 16:12
-
-
Save vssun/1933393 to your computer and use it in GitHub Desktop.
തലക്കെട്ടിൽ തിരഞ്ഞ് താളുകളെ കണ്ടെത്താൻ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
തലക്കെട്ടിൽ തിരഞ്ഞ് താളുകളെ കണ്ടെത്താൻ | |
നിർമ്മിച്ചത്: സുനിൽ വി.എസ്., സരയുവിനൊപ്പം | |
തിയതി: 2012-02-27 | |
""" | |
import wikipedia | |
import pagegenerators | |
#പ്രധാന പ്രോഗ്രാം ഇവിടെ തുടങ്ങുന്നു. | |
#ആവശ്യത്തിനനുസരിച്ച് മാറ്റങ്ങൾ ഇതിനു താഴെ വരുത്തുക | |
siteFamily = 'wiktionary' | |
siteLangCode = 'ml' | |
startPage = u'അ' | |
checkString = u'' #ZWJ | |
outputPage = 'user:vssun/test' | |
#ആവശ്യത്തിനനുസരിച്ച് മാറ്റങ്ങൾ ഇതിനു മുകളിൽ വരുത്തുക | |
myText = u'' | |
wikiSite = wikipedia.Site(code=siteLangCode, fam=siteFamily) | |
myOutputPage = wikipedia.Page(site=wikiSite,title=outputPage) | |
for myPage in pagegenerators.AllpagesPageGenerator(start =startPage, namespace=None, includeredirects=False,site=wikiSite): | |
wikipedia.output("Working on " + myPage.title()) | |
if checkString in myPage.title(): | |
wikipedia.output(myPage.title()) | |
myText=myText+"#[["+myPage.title()+"]]\n" | |
myOutputPage.put(myText) | |
wikipedia.stopme() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment