Skip to content
Advertisement

Tag: css

How to get Selenium to recognise a button and click it?

How would I get selenium python to recognise this button in HTML? I’ve tried this and other tags to get it This is the button snippet code Answer Your locator is wrong. The class is named cookie-monster__cta, not .cookie-monster. js-cookie-monster-accept seems to be unique class name. Use it for finding your element. Also, you should wait for elements before clicking

Problem loading background image from external css (django)

I’m having trouble loading an image via external CSS on Django. It works fine using inline CSS but I want to understand why it doesn’t work using external one. Any help would be appreciated: My tree: CSS: HTML: settings.py: P.S I’m using localhost and image does load via URL: http://127.0.0.1:8000/static/website/img/Racoon.jpg Answer replace: with ../means parent directory. you first go back

Django project without models and data base

It is possible to build a project in Django without models ? I have a views, templates(html), css and urls. That site is looking very good in a browser. It is a hairdressing salon website. Greetings Answer It is completely possible to create a Django project without any models. You only really need models if your website contains objects, like

scrapy css selector returning None then finds value

So basically I am adding this portion to my code and I have no clue whats going on. This is the link i am using https://www.digikey.com/products/en?keywords=ID82C55 All in the same Process: -So my css selector returns none. -Then it finds a couple of the html elements returns some of them. -Then finds the last element. So this is causing my

Unable to locate text from web page using Selenium

I am trying to scrape amazon reviews for a certain product, but I am unable to locate the text for the ratings using selenium. But the same thing is easily scraped using soup. Link to page: https://www.amazon.in/BenQ-inch-Bezel-Monitor-Built/product-reviews/B073NTCT4R/ref=cm_cr_arp_d_paging_btm_next_2?ie=UTF8&reviewerType=all_reviews&pageNumber=39 Here is my code using Soup: ##Output 4.3 5.0 1.0 5.0 2.0 4.0 1.0 5.0 5.0 5.0 5.0 5.0 5.0 Here is my

Advertisement