نادي الفكر العربي
. - نسخة قابلة للطباعة

+- نادي الفكر العربي (http://www.nadyelfikr.com)
+-- المنتدى: الســــــــاحات العامـــــــة (http://www.nadyelfikr.com/forumdisplay.php?fid=3)
+--- المنتدى: قضايا اجتماعيــــــة (http://www.nadyelfikr.com/forumdisplay.php?fid=60)
+---- المنتدى: ساحة الأعضاء الجدد (http://www.nadyelfikr.com/forumdisplay.php?fid=18)
+---- الموضوع: . (/showthread.php?tid=5862)

الصفحات: 1 2 3 4 5 6 7 8 9


. - globus - 03-25-2008

http://news.bbc.co.uk/go/rss/-/hi/arabic/m...000/7310150.stm


. - globus - 03-25-2008

http://news.bbc.co.uk/go/rss/-/hi/arabic/m...000/7309791.stm


. - globus - 03-25-2008

http://news.bbc.co.uk/go/rss/-/hi/arabic/w...000/7309751.stm


. - globus - 03-25-2008

http://news.bbc.co.uk/go/rss/-/hi/arabic/m...000/7310069.stm


. - سهيل - 03-25-2008

:D:D

http://www.nadyelfikr.net/index.php?showto...mp;#entry473547




. - سهيل - 03-25-2008

In prototyping, Python is superior programming language

كود:
import feedparser, mechanize

###  List of sites to be scanned. You can add more !
sites=["http://www.alarabiya.net/rss/PoliticsPage.xml",\
       "http://www.asharqalawsat.com/rss/AAARSS4.xml",\
       "http://newsrss.bbc.co.uk/rss/arabic/middle_east_news/rss.xml", \
       ]

###  Links to be posted at the forum
links=[]

###  Fill in the links
for site in sites:
    parsed_site = feedparser.parse(site)
    for i in parsed_site.entries:
        links.append(i.link.encode('ascii'))


###  Login nadyelfikr.com
b = mechanize.Browser(factory=mechanize.DefaultFactory(i_want_broken_xhtml_support=True))
b.set_handle_robots(False)
b.open("http://www.nadyelfikr.com")
b.select_form(nr=1)
b["UserName"] = 'globus'
b["PassWord"] = "somepassword"
b.submit()

###  Post the links one by one
url="http://www.nadyelfikr.net/index.php?act=post&do=reply_post&f=144&t=53182"
for link in links:
    post_text(link,url, b)

    
def post_text(txt=":)", url=None, b=None):
    b.open(url)
    b.select_form("REPLIER")
    b["Post"] =txt
    control = b.form.find_control("attachgo")
    control.disabled= True
    b.submit()    

:97: