Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
Bottom Page

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
nilamo likes this post


Attached Files Thumbnail(s)
   
Quote
#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>
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Should Python 3 become multi-threaded by design? uc1 4 276 Jul-30-2017, 04:31 AM
Last Post: Skaperen

Forum Jump:


Users browsing this thread: 1 Guest(s)