I have an app that has a list of projects, and each project has a number of posts, and when you click on a project, it shows all of the posts in that project, but I can’t figure out how to make it display what project the user is currently on, sample of it not working It should say “Posts
Tag: html
Convert html table to json with BeautifulSoup
I am trying to convert HTML table to json using beautifulsoup() function python, I was able to convert but the data coming in wrong json format. The above code prints JSON in the below format. I would like to get it in below format Some help is appreciated Answer The output you want is not a valid format, so you
Looping through HTML & following links
I am writing a code that is supposed to open a url, identify the 3rd link and repeat this process 3 times (each time with the new url). I wrote a loop (below), but it seems to each time sart over with the original url. Can someone help me fix my code? Answer You need to define the empty list
selenium xpath unable to identify class visually seen in HTML
I am trying to click on the rate button to set the rating for episode one of Atlanta season four on the IMDB website as illustrated by the image further below. I have tried various combinations of selenium xpath values and have googled various links to attempt to achieve this, but can’t remember which now. My current python is below.
Im managed to display values of a table in html with flask and python but i dont understand the logic behind my solution
this part of code im using to Display the entries in the database on index.html birthday database and this is the html code i use to display the name, the month , and day can someone explain if i have assign and the variable name = people whats the logic behind this loop ? Answer I recommend you to learn
Any values taken from a Listbox return as “none” in bottle
I have a website in which you take values inputted from a website (using bottle) and add them to a database (using sqlalchemy). The data gathered for “Status” needs very specific strings otherwise it will fail so I thought of using a Listbox in order to avoid a miss input. When debugging whenever I try to use any type of
Python Scrap Same item from all subpages using BeautifulSoup
I am trying to scrap “salary” from each subpage. For one of the subpage, I am copying the specific contents of the soup =BeautifulSoup(requests.get(‘url_of_job’).text. I copied soup content to a word file and sliced the content surrounding salary and copied here. Copying all text crosses the limit here. soup = My code: Present solution: Expected solution: Answer Here is a
How should I insert html input data into a Django database
I can’t figure out how to fix this problem. I’m trying to insert some data from a html form into a small simple Django database; SQLite if I’m right. I tried to follow tutorials and did allot of searching online but it seems like I’ve hit tutorial hell. my question is: How can I achieve putting data from the text
How can I scrape an apple HTML page using python?
I am trying to scrape the h2 tag below from the apple page in the python 3.10.6 code further below. I can see the h2 tag on the page; but my python running on PyCharm 2022.1.4 is unable to scrape it. episode-shelf-header is a unique class in the html code on this page. I did search for a solution to
Why does my flask route show 404, after trying to link it into my starting page
enter image description here[ How my search route appears This the code used in my app.py. I have tried {href=”./search.html”} but there is no difference. Edit How my project folder looks like Edit 2: My mistake in the routing Answer EDIT to link your routes from within your HTML pages, you can use the url_for function inside double curly brackets.