Skip to content
Advertisement

Tag: html

How to trigger a Javascript-generated HTML to show on the page with Python requests?

I’m using the requests module from Python to get a webpage that requires login to access. I know how to have requests enter the login details on a page, but I am having trouble accessing the form fields on this particular page because they are generated by Javascript after clicking a button. Here’s the website in question: https://pennmedialab.getconnect2.com/signin.aspx When first

Nested Dict to Table in Jinja2

I am scratching my head trying to correctly format a table from a nested dict in Jinja2, but having no luck. The dict is something like this: And I want the table to look like: The closest I have come is: But this doesn’t work. I am having trouble assigning the k1 variable without also having to extend the loop

How to scrape the text from this data?

I want to get the data regarding the information regarding “images” subsection. This is the code that I have written until now. However, I could not move forward. Could anybody please help? Answer You are on the right track, you just need to further dissect the information from that tag, to get what you need. Here is one way of

Get the desired table from the site

There is a link to a site with a schedule. On the page there are 3 elements <select>: Institute (faculty), course, group. How to get the desired table through Requests? I tried Post and Get, unsuccessfully. Maybe Requests will not help here at all, and it is better to try Selenium? Answer You can use BeautifulSoup to parse the elements:

How to put object datefield in html input value

I have a class “client” with an attribute datefield called “birth_date”. I want to give the possibility for update this field. How can i put the default value in the form, in the input type date? Because the format in “client.birth_date” is different. If i try with, for example: The input value is setting true, but the format is different

Advertisement