Differ my data:
- When data will come?
- When data will be rendered?
Differ by purposes:
- For development
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Proxy is launching...</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="frontPassport" content="66cecc9cecdbd" /> | |
<style> | |
* { | |
outline: 0; |
var REVIEW_RATING_REGEX = /"ratingValue": "([^"]+)",\s*"reviewCount": "([^"]+)"/; | |
var main = async () => { | |
const productCards = document.querySelectorAll(".x-product-card__card"); | |
Array.from(productCards).forEach(async (productCard) => { | |
// console.log('productCard.id', productCard.id); | |
const productUrl = `https://www.lamoda.ru/p/${productCard.id}`; | |
// console.log('productUrl', productUrl); |
var productCardList = document.querySelector('.SerpLayout'); | |
var productCards = Array.from(productCardList.querySelectorAll('[data-apiary-widget-name="@light/Organic"]')); | |
var gerProductCardRatingCount = (productCard) => { | |
const productCardRatingCountDigits = productCard.querySelector('[data-baobab-name="rating"] > div:last-of-type > div:last-of-type')?.innerText.match(/\d/g) || ['0']; | |
return Number(productCardRatingCountDigits.join('')); | |
} | |
productCards.sort((productCard1, productCard2) => { |
var productCardListList = document.querySelectorAll('.widget-search-result-container > div'); | |
var productCards = []; | |
productCardListList.forEach((productCardList) => { | |
const productCardListCards = Array.from(productCardList.querySelectorAll('.widget-search-result-container > div > div')); | |
productCards = [...productCards, ...productCardListCards]; | |
}); | |
var gerProductCardRatingCount = (productCard) => { | |
const productCardRatingCountDigits = productCard.querySelector('.tsBodyMBold > span:last-of-type')?.innerText.match(/\d/g) || ['0']; |
var productCardList = document.querySelector('.product-card-list'); | |
var productCards = Array.from(productCardList.querySelectorAll('.product-card')); | |
var gerProductCardRatingCount = (productCard) => { | |
const productCardRatingCountDigits = productCard.querySelector('.product-card__count')?.innerText.match(/\d/g) || ['0']; | |
return Number(productCardRatingCountDigits.join('')); | |
} | |
productCards.sort((productCard1, productCard2) => { |
#!/usr/bin/env bash | |
PACKAGE_FILE="package.json" | |
PACKAGE_RUN_COMMAND="npm" | |
RUN_COMMAND="bash ${0}" | |
SCRIPT="$1" | |
# Check package manager | |
if [ -f "package-lock.json" ]; then | |
PACKAGE_RUN_COMMAND="npm" |
import { useCallback, useEffect, useMemo, useState } from 'react'; | |
import { useDispatch } from 'react-redux'; | |
import cn from 'clsx'; | |
import { CrossIcon, ZeroGasIcon } from '@/assets/img'; | |
import { Button, Loader, Typography } from '@/components'; | |
import { useShallowSelector } from '@/hooks'; | |
import { useTimeLeft } from '@/hooks/useTimeLeft'; | |
import crowdSaleActionType from '@/store/crowdsale/actionTypes'; | |
import { updateCrowdSaleOpenState } from '@/store/crowdsale/reducer'; |
""" Custom serializer related field filtering based on request user. | |
""" | |
class Model1RelatedField(serializers.PrimaryKeyRelatedField): | |
"""Custom Model1 related field that filters queryset based on requesting user. | |
It is REQUIRED for filter-based permission on related object. | |
On needed for create and update actions bacause they choose form serializer related field.. | |
""" | |
def get_queryset(self): |