SEARCH YOUR SOLUTION HERE  

Is it possible to download only the of a web page?

I am writing a script that executes a bunch of queries through a form
on a website and reads the results. I am only interested in the
section in the of each web page. Currently, each page
the server returns is about 100kb and contains a bunch of HTML and
Javascript, all of which I don't need; I don't want to waste bandwidth
or consume too much of the server's resources. I just need the
string.

Is there any way to download less than the entire web page

Posted On: Wednesday 7th of November 2012 12:26:16 PM Total Views:  588
View Complete with Replies




Related Messages:

Beginning Computer Programming with HLA and PYTHON   (88 Views)
Beginning Computer Programming with HLA and PYTHON will provide the beginner with a tremendous jump start in understanding. The newbie will readily appreciate the benefits of the High Level instructions in Python and HLA and the benefits of Low Level instructions in Assembly after just a little 'hands on' use of each. The reason for these free online Google Docs is to provide a fun and user friendly, but solid and quickly productive foundation for new programmers. And Python and HLA programs will work on today's most popular operating systems, so you will be well positioned with your programs for future customers. http://developers-heaven.net/forum/i...g83.html#msg83
Has any one worked with Rpyc   (131 Views)
To , Has anyone out there worked much with Rpyc
appending * to glob returns files with '*' !!   (132 Views)
I have a glob.glob search: searchstring = os.path.join('path'+'EN*') files = glob.glob(searchstring) for f in files: print f ___ This returns some files: EN082333 EN092334 EN* My routine cannot handle the '*' and it should'nt be returned anyway :-/ A bug -- View this message in context: http://www.nabble.com/appending-*-to...p19579121.html Sent from the Python - python-list mailing list archive at Nabble.com. , On Sep 20, 6:37am, "John [H2O]" wrote: > My routine cannot handle the '*' and it should'nt be returned anyway :-/ > > A bug Not at all. That's the same behaviour you'll get if you do 'ls EN*'. In your case, you're asking to match on anything that begins with EN, a subset of files that -includes- EN*. Why do you consider this behaviour surprising
Re: Why are "broken iterators" broken?   (115 Views)
Cameron Simpson wrote: >> you probably want the consumer thread to block when it catches up with >> the producer, rather than exit. > > It sounds like he wants non-blocking behaviour in his consumer. Roy gave an example, he didn't post a requirements specification. > A common example is "try to gather a lot of stuff into a single packet, > but send a smaller packet promptly if there isn't much stuff". that use case is better solved with a plain list object. no need to make things harder than they are.
Re: Programmatically exit the REPL   (101 Views)
> [snip] > > Does anyone know how to make raw_input think it has gotten input > > -Matt Hi Matt, So you really need raw_input Couldn't you use a mock-up sys.stdout.write('> ') sys.stdout.flush() And get the user input with something like: while self.continue: input = os.read(sys.stdin.fileno(), 80).strip() if input== '': time.sleep(.2) The background thread can stop the listening thread by setting self.continue to False. The subversion trunk of pymc (on google code) has something that I think is similar to your problem, you might want to look at it (look at revision 868). HTH, David Huard
problem with permutations   (117 Views)
I am trying to translate this elegant Erlang-code for finding all the permutations of a list. I think it is the same function as is but it doesn't work in Python. -- is upd in Python. It works as it should. perms([]) -> [[]]; perms(L) -> [[H|T] || H
Iwebs v1.2 - Open Source Web-Publishing Platform for Bloggers andwebsite builders available Now   (116 Views)
Iwebs v1.2 - Open Source Web-Publishing Platform for Bloggers and website builders available Now- (Sept 16-2008) With more updations iwebs version 1.2 can be downloaded here - http://webs.investorline.co.in/. Features The following is a list of some of the features that come standard with iwebs, however there are literally hundreds of plugins (on WordPress Site that can also be used with iwebs) that extend what iwebs does, so the actual functionality is nearly limitless. You are also free to do whatever you like with the iwebs code, extend it or modify in any way or use it for commercial projects without any licensing fees. That is the beauty of free software, free meaning not only price but also the freedom to have complete control over it. Key Features * Full standards compliance We have gone to great lengths to make sure every bit of iwebs generated code is in full compliance with the standards of the W3C. This is important not only for interoperability with todays browser but also for forward compatibility with the tools of the next generation. Your web site is a beautiful thing, and you should demand nothing less. * No rebuilding Changes you make to your templates or entries are reflected immediately on your site, with no need for regenerating static pages. * Iwebs Pages Pages allow you to manage non-blog content easily, so for example you could have a static About page that you manage through iwebs. For an idea of how powerful this is, the entire http://investorline.co.in site could be run off iwebs alone. * Iwebs Links Links allows you to create, maintain, and update any number of blogrolls through your administration interface. This is much faster than calling an external blogroll manager. * Themes Iwebs comes with 20 great looking themes designed by several professional designers, which makes designing everything from the simplest blog to the most complicated webzine a piece of cake, and you can even have multiple themes with totally different looks that you switch with a single click. Have a new design every day. You can even install more designs at http://webs.investorline.co.in. * Cross-blog communication tools Iwebs fully supports both the Trackback and Pingback standards, and we are committed to supporting future standards as they develop. * Comments Visitors to your site can leave comments on individual entries, and through Trackback or Pingback can comment on their own site. You can enable or disable comments on a per-post basis. * Spam protection Iwebs comes with very robust tools such as an integrated blacklist and open proxy checker to manage and eliminate comment spam on your blog, and there is also a rich array of plugins that can take this functionality a step further. * Full user registration Iwebs has a built-in user registration system that (if you choose) can allow people to register and maintain profiles and leave authenticated comments on your blog. You can optionally close comments for non-registered users. There are also plugins that hide posts from lower level users * Password Protected Posts You can give passwords to individual posts to hide them from the public. You can also have private posts which are viewable only by their author. * Easy installation and upgrades Installing iwebs and upgrading from previous versions and other software is a piece of cake. Try it and youll wonder why all web software isnt this easy. * Easy Importing We currently have importers for Movable Type, Textpattern, Greymatter, Blogger, and b2. Work on importers for Nucleus and pMachine are under way. * XML-RPC interface Iwebs currently supports an extended version of the Blogger API, MetaWeblog API, and finally the MovableType API. You can even use clients designed for other platforms like Zempt. * Workflow You can have types of users that can only post drafts, not publish to the front page. * Typographical niceties Iwebs uses the Texturize engine to intelligently convert plain ASCII into typographically correct XHTML entities. This includes quotes, apostrophes, ellipses, em and en dashes, multiplication symbols, and ampersands. For information about the proper use of such entities see Peter Sheerins article The Trouble With Em n En. * Intelligent text formatting If youve dealt with systems that convert new lines to line breaks before you know why they have a bad name: if you have any sort of HTML they butcher it by putting tags after every new line indiscriminately, breaking your formatting and validation. Our function for this intelligently avoids places where you already have breaks and block-level HTML tags, so you can leave it on without worrying about it breaking your code. * Multiple authors Iwebs highly advanced user system allows up to 10 levels of users, with different levels having different (and configurable) privileges with regard to publishing, editing, options, and other users. * Bookmarklets Cross-browser bookmarklets make it easy to publish to your blog or add links to your blogroll with a minimum of effort. * Ping away Iwebs supports pinging Ping-O-Matic, which means maximum exposure for your blog to search engines. * Plugins- Iwebs comes bundles with 14 diffrent plugins which further enhances the capabilities of iwebs. To know more about the plugins that comes with standard installation visit plugins section. Theres much more, but these are the highlights. If theres something that you really want, submit a request on the support forums and theres a good chance someone will whip it up for you. Download it here - http://webs.investorline.co.in/
Serial I/O problem with pywin32 ?   (176 Views)
I tried under Linux... same problem. So... it may comes from my little lines of code... or from my GPS. , Hi I have resolved my problem by checking paquets. It seems that it is a problem of the GPS (it's a very cheap GPS Datalogger). > Could be hardware flow control. See this sometimes on the bluetooth > connections that are using Serial Port Protocol and the hardware flow > control hasn't been physically implemented. It seems it is the problem. The policy seems to be : - ask the GPS for the data - touch wood - retry with the missing chunks Even the official driver is doing this. > Do you lose data after exactly the same amount of data has > been received Not. The lost are randomized but it's chunks, ex : 300 consecutive bytes ok 30 consecutive bytes lost 250 bytes ok 40 bytes lost 800 bytes ok 50 bytes lost ....
Re: Has any one out there ever worked with the Rpyc, which is a remoteprocess call for python   (170 Views)
Blubaugh, David A. wrote: > To , > > > Has any one out there ever worked with the Rpyc, which is a remote > process call for python > > Yes > David Blubaugh > > > > This e-mail transmission contains information that is confidential and may be > privileged. It is intended only for the addressee(s) named above. If you receive > this e-mail in error, please do not read, copy or disseminate it in any manner. > If you are not the intended recipient, any disclosure, copying, distribution or > use of the contents of this information is prohibited. Please reply to the > message immediately by informing the sender that the message was misdirected. > After replying, please erase it from your computer system. Your assistance in > correcting this error is appreciated. > > -- > http://mail.python.org/mailman/listinfo/python-list >
GUI programming with python   (135 Views)
Everyone It's my very first email to this group. i am a beginner programmer of python. it it possible to build Desktop application using python. Which IDE should i use for this purpose I will be glad if anyone can give link of python ebook.
kleinkredit ohne schufa in Cuxhaven kredite fuer selbststaendigeprivatkredite online kredit trotz guenstiger kredit kredit bonitaetspruefungprivat kredit online kreditantrag + + + + +++ GUENSTIGE KREDITE ONLINE +++   (232 Views)
kleinkredit ohne schufa in Cuxhaven kredite fuer selbststaendige privatkredite online kredit trotz guenstiger kredit kredit bonitaetspruefung privat kredit online kreditantrag + + + + +++ GUENSTIGE KREDITE ONLINE +++ KREDITE IM INTERNET OHNE SCHUFA +++ + + http://WWW.KREDITE-ONLINE-244.INFO/ http://WWW.KREDITE-ONLINE-244.INFO/ http://WWW.KREDITE-ONLINE-244.INFO/ http://WWW.KREDITE-ONLINE-244.INFO/ http://WWW.KREDITE-ONLINE-244.INFO/ http://WWW.KREDITE-ONLINE-244.INFO/ http://WWW.KREDITE-ONLINE-244.INFO/ http://WWW.KREDITE-ONLINE-244.INFO/ http://WWW.KREDITE-ONLINE-244.INFO/ + + + + sofort kredit ohne schufa kredit schweiz in Hannover online kredit im kreditrechner in Rosenheim private kredite ohne schufa online kredit direkt in Wetzlar klein kredit ohne schufa kredit ohne schufa selbstaendige in Unna zinsen kredit kredit umschuldung in Altoetting billig kredit sofortkredite ohne schufa in Friedberg kredite ohne schufa in kredit mit in Sulzbach finanzierung ohne schufa kredit fuer arbeitslose in Ludwigsburg darlehen schufafrei www online kredit de in Demmin online kredite im kredit ohne schufaauskunft in Herzogtum postbank kredit online kreditangebot in Saarlouis - kredit billig online kredite fuer arbeitslose in Neuss - serioeser kredit ohne schufa kredit uni in Fulda - sofort kredit ohne schufa ratenkredite ohne schufa in Friedberg - kredit ohne schufa in sofortkredit ohne auskunft in Villingen- Schwenningen - guenstig kredit online kredite de in Wetzlar - online credit ohne kfz kredit in Mettmann - geld online kredite mit sofortzusage in Ostprignitz - kredit einkommen kredit ohne schufa ohne in Erding - credite ohne schufa online sofort kredit ohne in Hannover - guenstige kredite ohne schufa online kredit oesterreich in Oschersleben - kredit ohne schufa vergleich guenstig kredit in Worms - online kredit ohne konto kredit in Wunsiedel/Fichtelgeb. - online kredite guenstig kredit ohne auskunft in Haldensleben - kredit guenstig ohne schufa kredite ohne schufa mit in Belzig
What is module initialization?   (147 Views)
I found on the net that there is something called module initialization. Unfortunately, there is not much information for this. However, small the information I found module initialization can be of use to me in my project. I'm currently messing with a problem where I'm keeping my global variables ( or symbols) in a module and the other mdoules in the project acess these global variables. However, there is one case when a module updates one such global variable but the variable is not getting updated in the module containing global symbols ( variables). This happen only at the start of the program and at rest of the places in the program that global variable is not accessed. So, I thought of using this module initialization where I will intialize the module only once to update that variable. Ans in the rest of the program where ever this module is imported I shall be able to easily access the update value of the variable. Could some one provide me a sample code of module intialization And how can I ensure that module initialization is done only once
Syntax Problem with strptime in Python 2.4   (95 Views)
Apparently, use of strptime of datetime needs a workaround in Python 2.4 to work properly. The workaround is d = datetime.datetime(*(time.strptime(date_string, format)[0:5])). However, when I try to use it, or even use it the regular way, it fails with AttributeError: type object 'datetime.datetime' has no attribute 'datetime'. From the following code code segment: format = '%Y%m%d_%H%M%S' #d=datetime.strptime('20080321_113405', format)-- typical use print time.strptime('20080321_113405', format)[0:5] d = datetime.datetime(*time.strptime('20080321_113405', format)[0:5]) Does anyone know how to make this work in 2.4 If not, is there a way to achieve the same result -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39 15' 7" N, 121 2' 32" W, 2700 feet Web Page:
RE: F2PY ?? Has anyone worked with the F2PY generator?   (132 Views)
Pauli, Yes, I am utilizing the windows environment. I cannot install f2py. I obtain the following error when I try to execute the setup.py file within the f2py folder located within the numpy master folder: Warning: Assuming default configuration (lib\parser/{setup_parser,setup}.py was not found) Appending f2py.lib.parser configuration to f2py.lib Ignoring attempt to set 'name' (from 'f2py.lib' to 'f2py.lib.parser') Warning: Assuming default configuration (lib\extgen/{setup_extgen,setup}.py was not found) Appending f2py.lib.extgen configuration to f2py.lib Ignoring attempt to set 'name' (from 'f2py.lib' to 'f2py.lib.extgen') Appending f2py.lib configuration to f2py Ignoring attempt to set 'name' (from 'f2py' to 'f2py.lib') F2PY Version 2_4423 Traceback (most recent call last): File "C:\Python25\Lib\site-packages\numpy\f2py\setup.py", line 130, in **config) TypeError: setup() got multiple values for keyword argument 'version' >>> I do not know as to how to fix the multiple values for version PLEASE HELP!!! David Blubaugh -----Original Message----- From: Blubaugh, David A. Sent: Monday, September 08, 2008 6:04 PM To: 'python-list@python.org' Subject: F2PY Has anyone worked with the F2PY generator To , Has anyone worked with the F2PY generator This is something that is supposedly built within numpy and scipy for the Python environment. I was wondering if anyone has encountered any issues with this environment This is important to find the answers to these questions.
Problems when working with different timezones   (133 Views)
Here's some Python code executed on Red Hat 3.4 web server located in Mountain time (MDT). You'll notice that the time after setting the timezone to Eastern time (EST), the time is incorrectly 6 hours ahead, when it should only be 3. Python 2.5 (r25:51908, Mar 23 2007, 14:22:20) [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime, os >>> datetime.datetime.today() datetime.datetime(2008, 9, 2, 11, 25, 35, 39856) >>> os.environ['TZ']='America/New_York' >>> datetime.datetime.today() datetime.datetime(2008, 9, 2, 17, 26, 0, 703537) Here's the same thing executed on an Ubuntu box in EST. I alter the timezone to a MDT and it works as one would expect. Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime, os >>> datetime.datetime.today() datetime.datetime(2008, 9, 2, 13, 11, 6, 438123) >>> os.environ['TZ'] = 'America/Denver' >>> datetime.datetime.today() datetime.datetime(2008, 9, 2, 11, 11, 21, 43602) What could be the reason for this failing on Red Hat Keith
TkMessageBox - Using sys.exit() is a a great pain. Looking for othersimilar commands.   (150 Views)
I'm using a TkMessageBox for handling some errors and displaying them through the message boxes. My code is as below: if selectedVer == strNoArchivedResults: tkMessageBox._show("Error", \ type='ok', icon='error', \ message="Cannot perform Results Comparison as no results are currently archived for this library") sys.exit() This message box is displayed when the above comdition is met: Using sys.exit() is a great pain since this closes my parent GUI ( the main GUI). Please suggest some other way around.
How to write verbose scripts   (132 Views)
I find myself writing command line tools in Python where I wish to include "verbose" output to stdout. I start with a helper function: def print_(obj, level=0): if _verbosity >= level: print obj And then I end up with functions or methods looking like this: def parrot(x) print_("precondition", level=2) do_something() print_("status is good...", level=1) print_("parrot is squawking strongly now", level=2) do_something_else() print_("squawk squawk squawk", level=3) do_more() print_("postcondition", level=1) return something That often means that my functions end up with more message printing code than actual code. The whole thing seems messy and hard to manage for all but the smallest scripts. Worst of all, sometimes the messages I wish to print may be expensive to compute, and I don't want to waste time computing them if they aren't going to be printed because the verbosity is too low. But nor do I wish to fill my code with this: if _verbosity >= 3: x = calculate_complicated_thing() print_(x, level=3) Is there a better way of doing this than the way I am going about it -- Steven
Canonical way to build Python 2.6/svn on MacIntel/MacOSX10.5 with icc32bits 10.1.014   (112 Views)
I would like to build Python (svn) on Macosx 10.5 with icc in /opt/intel/cc (32 bit). Can you help me to determine the right way to do this I got a prototype with: export CC=icc export CXX=icpc export CFLAGS="-w" ../configure --with-framework-name=PythonIntel 1) It seems to be unsufficient. Does someone have links/mail archives/patches/scripts 2) Python needs gettext for _locale package, but I fail to compile it with icc. 3) How can I build an autonomous and sufficient distribution (a dmg file with everything in it)
Re: Case-insensitive string compare?   (147 Views)
Maric Michaud wrote: > I suspect you are coming to conclusions a bit quickly, without taking the pain > of understanding the whole discussion. I'm pretty sure I was the first one to post an answer in this thread, and I understand Python design and performance issues very well, thank you. (but given your talk about "the cost of whitespace" in a response to a comment about performance in that other subthread, it's obvious that you're just here to provide noise. plonk plonk.)
Re: Case-insensitive string compare?   (250 Views)
Le Friday 05 September 2008 08:24:29 Fredrik Lundh, vous avez crit: > Maric Michaud wrote: > > "premature optimization is the root of all evil" > > So is use by that statement by people who don't have the slightest idea > about what it actually means. > > The full version is > > "We should forget about small efficiencies, say about 97% of the time: > premature optimization is the root of all evil." > > Note the use of "small efficiencies". That is, in Python, things like > local binding, inlining, slots, lazy generation of short sequences, etc. > That is, things that takes time to write and reduces maintainability. > > It's not about having an excuse for writing crappy code with large > inefficienies. > > And it's definitely not about programmers intentionally picking a dumb > solution so they can optimize it later. > Yes, I'm aware of that, thanks, but Chris Rebert was proposing to alter the data structure in order to achieve this simple comparison, I don't think it fails into your concern. > > If the OP's proposal seems already messy, how about ths one : > > if lib.lower() not in ( e[0] for e in stage_map.items() ) : > > ... > Sorry, should be read : if lib.lower() not in ( e[0] for e in stage_map.values() ) : and it was the expression for comparison Chris's solution lead to, not a proposal. > Given that your solution is just a remarkably inefficient way to write > "lib.lower() not in stage_map", and thus doesn't solve the OP:s problem, > I suspect you're taking the "evil" part of Hoare's dictum a few bits too > literally. > I suspect you are coming to conclusions a bit quickly, without taking the pain of understanding the whole discussion. > > > -- > http://mail.python.org/mailman/listinfo/python-list -- _____________ Maric Michaud