1
vote
3answers
27 views

Explaining how to use classes with SASS to a Python thinker

I am coming from object-oriented Python-land and need help with a basic question as I learn SASS (+compass/susy) and CSS. Globally, I am struggling to understand how to relate classes and variables as ...
0
votes
0answers
34 views

Passing Data from PHP to Python

I am currently trying to decide how best to send data across from a php script to a python script but please keep reading as I have already looked at existing posts on the subject. Currently I am ...
0
votes
3answers
70 views

Python: Can we Loop inside a string?

Like for example I have a string of HTML Ordered List. Inside that ordered list, I want to write n number of lists. How can I accomplish the task of adding the lists to this string? Here is the ...
0
votes
1answer
12 views

Printing the html from one page doen't show all the source page with python and urllib2

i'm trying to read on specific page from amazon. req = ...
0
votes
2answers
20 views

Checkbox unchecked on reloading

I am working on flask and once I check a checkbox, again when I come back to the same page , checkbox gets unchecked.I want the checkboxes to be checked till the user manually unchecks them . {% for ...
0
votes
1answer
19 views

Associating multiple teams with multiple headers/values:

I want you to take a look at this site: http://www.nhl.com/ice/teamstats.htm Now, I have my code here. This only prints out all the headers on the top of the table: from bs4 import BeautifulSoup ...
0
votes
2answers
32 views

Read correctly an HTML with urllib2 and python

I opened this link "http://www.amazon.com/s?rh=n%3A1" with urllib2 and i was trying to fetch the next page link ...
0
votes
1answer
22 views

Python ─ UTF-8 filename from HTML form via CherryPy

Python Header: # ! /usr/bin/env python # -*- coding: utf-8 -*- # image_upload.py Cherrypy Config: cherrypy.config.update( ...
1
vote
1answer
18 views

Why is my link extraction not working?

I am looking to learn Beautiful Soup, and trying to extract all links from the page http://www.popsci.com ... but I am getting a syntax error. This code should work, but it doesn't for any page I try ...
1
vote
1answer
37 views

Python: Convert quote in HTML content not HTML tags

I have a piece of HTML like this: <pre class="script">template("main/GlobalShared");</pre> <pre class="script"> var link = '/Draft/Tracker_1.1'; if (wiki.pageexists(link)) { ...
0
votes
1answer
20 views

Badlinestatus: <html> | Python with http.client - Works for some sites but not others

import http.client import csv def http_get(url, path, headers): try: conn = http.client.HTTPConnection(url) print ('Connecting to ' + url) conn.request(url, path, ...
2
votes
2answers
27 views

Modular templates in django

I am getting started with Django, and I'm trying to make a modular template, but I don't know how. Now, I have the following files: 1- base.html (which provides basic layout for all the website): {% ...
3
votes
1answer
29 views

Having multiple templates nested within each other using weby

I have set up a website using webpy. I have my main page called layout.html. I load foo1.html into layout $def with (content) <html> <head> <title>Foo</title> ...
73
votes
10answers
43k views

Strip HTML from strings in Python

from mechanize import Browser br = Browser() br.open('http://somewebpage') html = br.response().readlines() for line in html: print line When printing a line in an HTML file, I'm trying to find a ...
50
votes
13answers
49k views

Extracting text from HTML file using Python

I'd like to extract the text from an HTML file using Python. I want essentially the same output I would get if I copied the text from a browser and pasted it into notepad. I'd like something more ...

1 2 3 4 5 145
15 30 50 per page