title: Unable to scrape the beginning of different events from a table of a webpage using requests
body: <p>I've been trying to scrape event times from the table of this <a href="https://opensea.io/collection/critterznft?tab=activity&amp;search%5BisSingleCollection%5D=true&amp;search%5BeventTypes%5D%5B0%5D=AUCTION_SUCCESSFUL&amp;search%5BeventTypes%5D%5B1%5D=OFFER_ENTERED" rel="nofollow noreferrer">webpage</a> using requests module. I have had success scraping timestamp of events from there but can't figure out how to convert them to seconds or minutes.</p>
  <p>The following image shows the beginning of the event that I want to capture from that table.</p>
  <p><a href="https://i.stack.imgur.com/fMxCN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fMxCN.jpg" alt="enter image description here" /></a></p>
  <p>This is how I've tried with:</p>
  <pre><code>import requests
  
  link = 'https://api.opensea.io/graphql/'
  payload = {&quot;id&quot;:&quot;EventHistoryQuery&quot;,&quot;query&quot;:&quot;query EventHistoryQuery(\n  $archetype: ArchetypeInputType\n  $bundle: BundleSlug\n  $collections: [CollectionSlug!]\n  $categories: [CollectionSlug!]\n  $chains: [ChainScalar!]\n  $eventTypes: [EventType!]\n  $cursor: String\n  $count: Int = 16\n  $showAll: Boolean = false\n  $identity: IdentityInputType\n) {\n  ...EventHistory_data_L1XK6\n}\n\nfragment AccountLink_data on AccountType {\n  address\n  config\n  isCompromised\n  user {\n    publicUsername\n    id\n  }\n  ...ProfileImage_data\n  ...wallet_accountKey\n  ...accounts_url\n}\n\nfragment AssetCell_asset on AssetType {\n  collection {\n    name\n    id\n  }\n  name\n  ...AssetMedia_asset\n  ...asset_url\n}\n\nfragment AssetCell_assetBundle on AssetBundleType {\n  assetQuantities(first: 2) {\n    edges {\n      node {\n        asset {\n          collection {\n            name\n            id\n          }\n          name\n          ...AssetMedia_asset\n          ...asset_url\n          id\n        }\n        relayId\n        id\n      }\n    }\n  }\n  name\n  slug\n}\n\nfragment AssetMedia_asset on AssetType {\n  animationUrl\n  backgroundColor\n  collection {\n    displayData {\n      cardDisplayStyle\n    }\n    id\n  }\n  isDelisted\n  imageUrl\n  displayImageUrl\n}\n\nfragment AssetQuantity_data on AssetQuantityType {\n  asset {\n    ...Price_data\n    id\n  }\n  quantity\n}\n\nfragment CollectionLink_assetContract on AssetContractType {\n  address\n  blockExplorerLink\n}\n\nfragment CollectionLink_collection on CollectionType {\n  name\n  ...collection_url\n  ...verification_data\n}\n\nfragment EventHistory_data_L1XK6 on Query {\n  assetEvents(after: $cursor, bundle: $bundle, archetype: $archetype, first: $count, categories: $categories, collections: $collections, chains: $chains, eventTypes: $eventTypes, identity: $identity, includeHidden: true) {\n    edges {\n      node {\n        assetBundle @include(if: $showAll) {\n          relayId\n          ...AssetCell_assetBundle\n          ...bundle_url\n          id\n        }\n        assetQuantity {\n          asset @include(if: $showAll) {\n            relayId\n            assetContract {\n              ...CollectionLink_assetContract\n              id\n            }\n            ...AssetCell_asset\n            ...asset_url\n            collection {\n              ...CollectionLink_collection\n              id\n            }\n            id\n          }\n          ...quantity_data\n          id\n        }\n        relayId\n        eventTimestamp\n        eventType\n        offerExpired\n        customEventName\n        ...utilsAssetEventLabel\n        devFee {\n          asset {\n            assetContract {\n              chain\n              id\n            }\n            id\n          }\n          quantity\n          ...AssetQuantity_data\n          id\n        }\n        devFeePaymentEvent {\n          ...EventTimestamp_data\n          id\n        }\n        fromAccount {\n          address\n          ...AccountLink_data\n          id\n        }\n        price {\n          quantity\n          quantityInEth\n          ...AssetQuantity_data\n          id\n        }\n        endingPrice {\n          quantity\n          ...AssetQuantity_data\n          id\n        }\n        seller {\n          ...AccountLink_data\n          id\n        }\n        toAccount {\n          ...AccountLink_data\n          id\n        }\n        winnerAccount {\n          ...AccountLink_data\n          id\n        }\n        ...EventTimestamp_data\n        id\n        __typename\n      }\n      cursor\n    }\n    pageInfo {\n      endCursor\n      hasNextPage\n    }\n  }\n}\n\nfragment EventTimestamp_data on AssetEventType {\n  eventTimestamp\n  transaction {\n    blockExplorerLink\n    id\n  }\n}\n\nfragment Price_data on AssetType {\n  decimals\n  imageUrl\n  symbol\n  usdSpotPrice\n  assetContract {\n    blockExplorerLink\n    chain\n    id\n  }\n}\n\nfragment ProfileImage_data on AccountType {\n  imageUrl\n  address\n}\n\nfragment accounts_url on AccountType {\n  address\n  user {\n    publicUsername\n    id\n  }\n}\n\nfragment asset_url on AssetType {\n  assetContract {\n    address\n    chain\n    id\n  }\n  tokenId\n}\n\nfragment bundle_url on AssetBundleType {\n  slug\n}\n\nfragment collection_url on CollectionType {\n  slug\n}\n\nfragment quantity_data on AssetQuantityType {\n  asset {\n    decimals\n    id\n  }\n  quantity\n}\n\nfragment utilsAssetEventLabel on AssetEventType {\n  isMint\n  eventType\n}\n\nfragment verification_data on CollectionType {\n  isMintable\n  isSafelisted\n  isVerified\n}\n\nfragment wallet_accountKey on AccountType {\n  address\n}\n&quot;,&quot;variables&quot;:{&quot;archetype&quot;:None,&quot;bundle&quot;:None,&quot;collections&quot;:[&quot;critterznft&quot;],&quot;categories&quot;:None,&quot;chains&quot;:None,&quot;eventTypes&quot;:[&quot;AUCTION_SUCCESSFUL&quot;,&quot;OFFER_ENTERED&quot;],&quot;cursor&quot;:None,&quot;count&quot;:16,&quot;showAll&quot;:True,&quot;identity&quot;:None}}
  
  headers = {
      'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36',
      'x-signed-query': '53ff23d0333e3997651740e18c7ea66da6f29fcc5e4d5aacd302574209e44e56',
  }
  
  res = requests.post(link,json=payload,headers=headers)
  for item in res.json()['data']['assetEvents']['edges']:
      event_time = item['node']['eventTimestamp']
      print(event_time)
  </code></pre>
  <p>Current output are like:</p>
  <pre><code>2022-01-06T15:11:05.010779
  2022-01-06T14:58:44
  2022-01-06T14:53:07.718379
  2022-01-06T14:53:07.775447
  </code></pre>
  <p>Expected output:</p>
  <pre><code>1 minute ago
  1 minute ago
  2 minutes ago
  2 minutes ago
  </code></pre>
  <blockquote>
  <p>How can I grab the beginning of different events from the table of that webpage using requests?</p>
  </blockquote>