ویکیپدیا:درخواستهای ربات/تصویر همسنگ: تفاوت میان نسخهها
محتوای حذفشده محتوای افزودهشده
←کد: رفع مشکلات تولسرور روی ۲۰۰ مقاله تست شد و چند مورد هم کار کرد و مشکلی نبود :) |
←کد: افزودن تصویر به مقالاتی که تصویر جایگزین دارند |
||
خط ۱۰۳:
if checksite(imagename)==u'commons':
try:
imfa = re.search(ur'\|عکس|نگاره|تصویر.*?\=.*?\|', text_fa2)
if imfa:
try:
imagenamefa=imfa.group(0).split(u'=')[1].replace(u'|',u'').strip()
if imagenamefa!=u'':▼
if imagenamefa.find(u'Replace this image
text_fa2=text_fa2.replace(u'Replace
text_fa=text_fa.replace(u'Replace this image male.svg',u'',1).replace(u'Replace this image female.svg',u'',1)
else:▼
imfa
if
wikipedia.output(u'infobox
imageparameter=imfa.group(0).split(u'=')[0]
text_fa=text_fa.replace(imageparameter+u'=',imageparameter+u'='+imagename.strip(),1)
wikipedia.output( u"--image added to infobox!--" )
except:
wikipedia.output( u"--infobox doesn't be in fa.wiki--" )
سطر ۳۱۵ ⟵ ۳۲۰:
if PageTitles:
pages = [wikipedia.Page(faSite,PageTitle) for PageTitle in PageTitles]
gen = iter( pages )
if not gen:
wikipedia.stopme()
|