|
|
|
Python Submit bot for diigo.com |
|
|
|
|
Written by
|
|
Thursday, 22 October 2009 17:33 |
|
Another one in a series of submit bots in python. Â this bot takes your google sitemaps and finds all the URLs between the "loc" tags on your site and makes a curl call to those ursl to retrieve the site tags, description etc. and then submits them to diigo usage - replace IM.xml with the path to your sitemap file in line
xmlsitemap = open("IM.xml","r")Â
syntax - python submit_to_diggo.py -u username -p password
[This line is replaced by a file repository when the article is viewed] Â If you like this bot or any other programs on this site I request you to consider a donation to allow me to continue my freelance development of cool products. You are however free to use these pieces of code either way. Â |
|
Last Updated on Wednesday, 04 November 2009 12:56 |
|
|
Python Submit bot for delicious |
|
|
|
|
Written by
|
|
Wednesday, 21 October 2009 18:09 |
|
Today I wrote a submit bot in python that takes all the urls in your google sitemap and submits them to del.ico.us  this bot takes your google sitemaps and finds all the URLs between the tags on your site and makes a curl call to those ursl to retrieve the site tags, description etc. and then submits them to del.icio.us or delicious. This bot is very useful for social bookmarkins and improving the SEO of your site quickly. usage - replace IM.xml with the path to your sitemap file in line
xmlsitemap = open("IM.xml","r")Â Â - replace username and password in following lines with your del.ico.us username and password
dusername = "username" dpassword = "password" - execute with
$python submit_to_delicious.py
[This line is replaced by a file repository when the article is viewed] Â If you like this bot or any other programs on this site I request you to consider a donation to allow me to continue my freelance development of cool products. Although you are free to continue using these pieces of code even if you decide not to donate. |
|
Last Updated on Wednesday, 21 October 2009 18:14 |
|
Python based binary and text downloader library API for windows and linux |
|
|
|
|
Written by
|
|
Tuesday, 20 October 2009 18:34 |
|
A while ago I realised that many of the python functions available for url handling etc. dont work well in all platforms. besides some of the functions work for urls to local and others work for local to local file copies. A generic library which will copy a file irrespective of the local or remote location of its library is always a good idea IMO. As a part of the work I was doing I found the need to write my own robust downloader/copier library. This downloader allows anywhere to anywhere file copy. I called it downloader.py you have to pass the url or local file path of the file(binary or html/text) and the local location where you want it to be copied. and the function will do it  here is the syntax import downloader downloader.downloadfile(sourcepath,destinationpath) - Examples
- url to local(text)
- import downloader
downloader.downloadfile("http://abc.com/abc.html","/home/shantanu/abc.txt")
- local to local(text)
- import downloader
downloader.downloadfile("/home/shantanu/abc.txt","/home/shantanu/abc2.txt")
- url to local(Binary)
- import downloader
downloader.downloadfile("http://abc.com/abc.jpg","/home/shantanu/abc.jpg")
- local to local(text)
- import downloader
downloader.downloadfile("/home/shantanu/abc.jpg","/home/shantanu/abc2.jpg")
downloader.py has been released under GPL by me and you are free to copy modify or distribute it. I request you to keep the original credits. Happy downloading. Â Coming up: Â A project to create a spider using downloader.py [This line is replaced by a file repository when the article is viewed] |
|
Last Updated on Tuesday, 20 October 2009 18:40 |
|
|
|
|
|
|