Python Forum
Beginner help - Leap Year Issue Feb 29 and multiple pages
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Beginner help - Leap Year Issue Feb 29 and multiple pages
#3
(May-06-2020, 05:22 PM)Larz60+ Wrote: you will have to extract dates and test each
use calendar function:
>>> import calendar
>>> print(calendar.isleap(2020))
True
>>> print(calendar.isleap(2019))
False

Appreciate a response. I have no idea what to do with this.
I thought maybe you mean like once I get the date, I run it through a pass fail for leap year or Feb-29 and if it fails then apply something to fix it, but I cannot find anything or everything i've tried isn't working. sorry bu can I get more help please?
		
sold = container.find('span', class_='s-item__ended-date').text
soldd = datetime.strptime(sold, '%b-%d %H:%M')
solddd = datetime.strftime(soldd, '%d-%b') 
Date_sold.append(solddd)
And thought ok if I go 'print(calendar.isleap(sold)
Reply


Messages In This Thread
RE: Beginner help - Leap Year Issue Feb 29 and multiple pages - by warriordazza - May-07-2020, 07:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Scrape table from multiple pages Nhattanktnn 1 919 Jun-07-2023, 09:35 AM
Last Post: Larz60+
  Web scrap multiple pages anilacem_302 3 3,917 Jul-01-2020, 07:50 PM
Last Post: mlieqo
  scraping multiple pages from table bandar 1 2,759 Jun-27-2020, 10:43 PM
Last Post: Larz60+
  Scraping Multiple Pages mbadatanut 1 4,288 May-08-2020, 02:30 AM
Last Post: Larz60+
  Looping through multiple pages with changing url Qaruri 2 2,662 Jan-17-2020, 01:55 PM
Last Post: Qaruri
  How to handle tables splitted across multiple web pages ankitjindalbti 2 2,154 Jun-02-2019, 07:33 AM
Last Post: ankitjindalbti
  scraping multiple pages of a website. Blue Dog 14 22,638 Jun-21-2018, 09:03 PM
Last Post: Blue Dog

Forum Jump:

User Panel Messages

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