0
votes
0answers
16 views

Remove escape sequences from parsed HTML

I'm using the Python mechanize module to submit a simple query to a website, then break down the returned elements to get the data I need. But I can't seem to correctly handle the escape sequences ...
0
votes
0answers
12 views

Python Mechanize login form, sending input to a field with a randomly generated name

I'm trying to automate the login to a site, http://www.tthfanfic.org/login.php. The problem I am having is that the password field has a name that is randomly generated, I have tried using it's ...
0
votes
2answers
29 views

Text Extraction from HTML Data

I have have a problem with extracting information from messy HTML data. Basically what I want to do is extract only the actual displayed words from a given piece of HTML code. Here is an example of ...
0
votes
0answers
15 views

python-bs4 in Ubuntu and Vista

This is a follow up of a question I asked recently and which it was partially answered. (I still cannot get the results of a nested div into a csv file.) The question here is about the python ...
1
vote
0answers
48 views

Processing a PDF for information extraction

I am working on a project where I have a pdf file which describes one of the health policy. What I need to do is extract the information from this PDF and try to save it in some form such that I can ...
1
vote
0answers
22 views

Python Mechanize fill textarea and submit a get-method form

I am trying to get the METAR code converted on the web first then scrape the results. But now I am facing a problem where the form's method is GET. This is my first time to use mechanize to do this. ...
1
vote
0answers
23 views

making a self made html fixer handle universal tags

what this following code does is, it takes a set open tag and a end tag, and if there are any unclosed tags of that type, it will close them. the problem with this is, it wont handle font tags, as ...
1
vote
1answer
36 views

Google App Engine Boilerplate - Contact template

Okay, I'm getting frustrated with the lack of resources for GAE boilerplate especially since it's a wee bit complex as far as directory structure, so I'm coming here. Anyways, I have this contact ...
1
vote
1answer
34 views

How can I create a callable function from a textarea in Flask?

I'm trying to create a Flask application that reads a text function from a textarea in my HTML file and evaluates that to store in an actual function, so I can call it later at any time using my own ...
3
votes
1answer
31 views

Unsupported format character “;”. Can't figure this out

I've been stumped on what is probably a very stupid mistake for a while now. Searching google has not helped me. I am learning python and trying to create a simple signup page. When I try to use ...
1
vote
2answers
30 views

Find a html tag using BeautifulSoup in Python

I want to find a specific tag in a html code like if there are 2 tags then how can i get the contents of the second tag and not the first one which soup.find(id='contact1') does here is the example ...
0
votes
2answers
31 views

matching un-closed font tags in the same line using regex

i know that regex is not good for parsing html, however this is only a single line string that is imputed to a function. for example, <font color = "#ff0000"> hello </font>. now for the ...
-1
votes
0answers
28 views

How to use a variable in img tag in Django Templates

I have started using Django templates for web programming. I am using templates, and while giving the img src as a variable, it is not showing the image. Even when i hard-code the image path, it is ...
0
votes
2answers
25 views

How do i use pagination in django

The code is not clear, Want to use pagination in django template. What does in views.py ?? what does in settings,py ?? Template is:- <div id="contentwrapper"> <div ...
0
votes
1answer
29 views

Google App Engine Boilerplate help - How does it direct templates to URL path

I recently had major troubles with Google App Engine and Python as I am inexperienced, so, by luck I found GAE Boilerplate on GitHub. I started using it, and everything's fine, but I want to add ...
0
votes
1answer
55 views

Post http python

When run, the below python script produces an HTML file. When the user clicks on submit your request, the big textarea below it is filled with parameters that I want to send to another python script. ...
0
votes
1answer
38 views

Manipulating Data in an HTML File

I am using python and I have an HTML file that has a table containing the sample name, gene name, and number of cases and controls in the experiment. Like this... Sample Gene Cases,Controls ...
2
votes
0answers
67 views

How to structure a parser

I am building a simple parser and I have trouble getting my head around the general design. What would be the best practice? The parser takes a simple text file and structures it into a HTML file, ...
1
vote
2answers
37 views

Filter strings into list depending on position - Python

For example, this is my string: myString = "<html><body><p>Hello World!</p><p>Hello Dennis!</p></body></html>" and what i am trying to achieve is: ...
0
votes
3answers
75 views

Submitting HTML form with additional hidden data using JQuery

I'm trying to add another parameter using a hidden input: $('#form1').submit(function(){ //listen for submit event $('<input />').attr('type', 'hidden') .attr('name', 'id') ...
1
vote
1answer
49 views

Twitter bootstrap with Django 1.5

I am trying to integrate Twitter bootstrap with my django application. In settings.py, I have: STATIC_URL = '/static/' # Additional locations of static files STATICFILES_DIRS = ( # Put strings ...
0
votes
1answer
28 views

Handle Multiple Checkboxes with a Single Serverside Variable

I have the following HTML code: <form method="post"> <h5>Sports you play:</h5> <input type="checkbox" name="sports_played" value="basketball"> ...
0
votes
2answers
47 views

HTML + JQuery: Empty form values

I'm trying to send the form data + additional parameter "id" to the server (Python, Google App Engine). My form: <form method="post" action="/" id="form1" runat="server" ...
0
votes
1answer
25 views

Sending form data in HTML with Python and Google App Engine

My HTML code: <form action="/set_image" method="post" id="form1" runat="server" enctype='multipart/form-data'> <div class="fileButtons"> <input type='file' id="imgInp" ...
-3
votes
0answers
36 views

How can i upload multiple images to an html5 site? [closed]

Ok so here is my situation. I have an html5 website that currently has no images aside from the menu bar and flash. I need a way to upload dozens of photos at a time without having to hand code them ...
1
vote
2answers
38 views

regular expression http in python

I have a long text and I would like to obtain all the entries in the text that match the following pattern: http******.id.txt, where * could be any entry (unknown length), and the dots are actually ...
0
votes
0answers
28 views

Uploading images - Google App Engine + Python

I'm using this link as an example to uploading images: https://gist.github.com/jdstanhope/5079277 My HTML code: <form action="/upload_image" method="post" id="form1" runat="server"> ...
0
votes
1answer
14 views

jinja: Escape variable + concatenate

Hy I know i can escape a variable by piping the variable through the |e filter. But if i concatenate the variable with another string, everything gets escaped: {% set escaped = ...
0
votes
1answer
47 views

Python regex: search for HTML tags and modify them

I got an HTML file as string and want to change all <img src="http:.../../filename.png ..> to <img src="id:filename.png> How can I do this with regex? I got this so far: urls = ...
0
votes
2answers
28 views

how to convert string containing HTML element into HTML DOM elements form in Django Python

I'm a generating a string in the backend(Django python) as following:- str = "<div class='column span4 ui-sortable' id='column2'>...</div>" return ...

15 30 50 per page