import pywikibot

site = pywikibot.Site('test', 'wikipedia')
page = pywikibot.Page(site, 'import test')

page.text = '{{sync|wikilink=en.wikipedia|pagename=test|bot=miiohau}}'
page.save()
Sleeping for 8.5 seconds, 2016-10-02 00:23:06
Page [[Import test]] saved
page.text = page.text + 'random text'
page.save()
Page [[Import test]] saved
page.text
'{{sync|wikilink=en.wikipedia|pagename=test|bot=miiohau}}random text'
import re
syncTemplatePattern = re.compile("\{\{sync[^\}]*\}\}")
result = syncTemplatePattern.search(page.text)
result
<_sre.SRE_Match object; span=(0, 56), match='{{sync|wikilink=en.wikipedia|pagename=test|bot=mi>
result.group()
'{{sync|wikilink=en.wikipedia|pagename=test|bot=miiohau}}'
wSite = pywikibot.Site('en', 'wikipedia')
wPage = pywikibot.Page(wSite, 'test')
page.text = result.group() + wPage.text
page.save()
Page [[Import test]] saved
import pywikibot
import re

site = pywikibot.Site('test', 'wikipedia')
page = pywikibot.Page(site, 'import test')
syncTemplatePattern = re.compile("\{\{sync[^\}]*\}\}")
result = syncTemplatePattern.search(page.text)
wSite = pywikibot.Site('en', 'wikipedia')
wPage = pywikibot.Page(wSite, 'test')
page.text = result.group() + wPage.text
page.save()
Page [[Import test]] saved