Python Forum
web parsing multi-classnames with selenium
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
web parsing multi-classnames with selenium
#1
I had a program i wrote; maybe about a year ago. It uses selenium to login to Dollar General to auto clip digital coupons due to a lot of javascript on their site. They updated their site today and i noticed the program doesnt run as fluent as it did before.

My program used the div with classname "pod ci-gif recommended desktop " to identify unclipped coupons compared to clipped coupons. Note the space after in the class name. I figured out when i wrote the program that they added a space at the end. Not sure why but was required to find the correct class.

Now; after their site updated; i notice this space has changed again. However instead of consistently 1 single space after, it is now 2, or none. Which took me awhile to figure out what is going on with that. I took a screenshot at the point of looking at the source where the class name changes from now 2 spaces to no spaces at the end of the class name pod ci-gif recommended desktop

This isnt really a big issue, because the program still clips the coupons apperently (which is the time consuming part), and uses a different method to do that, but it used this class to identify and relay the number of coupons unclipped before running the program to determine if the program needs to be run at all or not.

I was just wondering if anyone saw something like this before? Im not even sure how i would introduce whitespace in the class name in CSS let alone why there is some class names with and without whitespace? I put a screenshot up for a viewable example

Attached Files

Thumbnail(s)
   
Recommended Tutorials:
Reply
#2
Parse some html using Selenium. It shows an error in case the class name contains spaces.

Here is the tag I'm searching for: <p class="p0 ng-binding">text</p>
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Selenium Parsing (unable to Parse page after loading) oneclick 7 5,892 Oct-30-2020, 08:13 PM
Last Post: tomalex
  How to properly do multi-processing with selenium shinaco 0 4,791 May-27-2020, 06:42 PM
Last Post: shinaco
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 3,588 Nov-03-2017, 08:41 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020