Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~6K People Reached
Interests
Programming, Linux, Buddhism
Favorite Tags
Member Avatar for r3bol

I made a scraper for a web site, but I'm having problems runninf my code... #!/usr/bin/env python from bs4 import BeautifulSoup import urllib2 import re # Get the links... html = urllib2.urlopen('http://www.blah.fi/asdf.html').read() links = re.findall(r'''<a\s+.*?href=['"](.*?)['"].*?(?:</a|/)>''', html, re.I) links_range = links[6:len(links)] # Scrape and append the output... f = open("test.html", "a") …

Member Avatar for happygeek
0
6K
Member Avatar for r3bol

Hi, I have a form with some radio buttons that are dynamically generated. I would need to send the id attribute value as well as the value attribte value in with the GET method. I can get the value of id pretty easy (see below), but can't figure out how …

Member Avatar for r3bol
0
60
Member Avatar for r3bol

While googleing for an answer I came across this thread... [url]http://www.daniweb.com/forums/thread55451.html[/url] ...which is pretty much my question, but I would be doing it in web directories. Would I need to connect with something like urlib2 and then try the os and glob examples. Maybe an example please? :D Thanks.

Member Avatar for richieking
0
77
Member Avatar for r3bol

[CODE]import ConfigParser replace_name = "Bob" replace_comment = "Bob was here" parser = ConfigParser.RawConfigParser() parser.optionxform = str # make option names case sensitive parser.read("/home/asdf/Dev/python/info_icons/test.desktop") parser.set("Desktop Entry", "Name", replace_name) parser.set("Desktop Entry", "Comment", replace_comment) parser.write(open("modified.desktop", "w"))[/CODE] The code above reads and writes changes to a configuration style file in Linux (actually the one …

0
52