开发者

Filling out paragraph text via urllib?

Say I have开发者_开发问答 a paragraph in a site I am managing and I want a python program to change the contents of that paragraph. Is this plausible with urllib?


Quite possibly; it depends on how the site is designed.

If the site is just a collection of static pages (ie .html files) then you would have to get a copy of the page, modify it, and upload the new version - most likely using sftp or WebDAV.

If the site is running a content management system (like Wordpress, Drupal, Joomla, etc) then it gets quite a bit simpler - your script can simply post new page content.

If it is static content maintained through a template system (ie Dreamweaver) then life gets quite a bit nastier again - because any changes you make will not be reflected in the template files, and will likely get overwritten and disappear the next time you update the site.


If you have access to any server-side scripting language, its easy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜