输入日期过滤器?

时间:2019-07-06 00:10:52

标签: ag-grid

我有一个问题,当我在列日期中单击过滤器的输入字段时,我创建了浮动过滤器及其工作,它显示日期选择器,我选择了日期及其工作。但是当用户在该输入日期中输入并单击Enter时,我遇到了问题,没有任何反应。 这是我的约会:

from bs4 import BeautifulSoup as soup
import csv
import requests
from urllib.request import urlopen

my_url = 'https://www.newegg.com/Video-Cards-Video-Devices/Category/ID-38?Tpk=graphics%20card'
#Opening up connection & grabbing the page
urlClient = urlopen(my_url)
page_html = urlClient.read()
#Close the client
urlClient.close()

#HTML Parsing
page_soup = soup(page_html, 'html.parser')

#Cleans Up the HTML
#print(page_soup.prettify())

#Grabs each product
containers = page_soup.findAll('div', {'class':'item-container'})

#Fix using https://beautifier.io/ to see in a new tab
#Contains 1 graphic card
container = containers[0]

filename = 'NewEggScrape.csv'
f = open(filename, 'w')

headers = 'Brand Name, Product Name, Shipping Price, Price \n'

f.write(headers)

for container in containers:

    divWithInfo = container.findAll('div',{'class':'item-info'})
    brand = divWithInfo[0].div.a.img['title']
    #print(brand)

    title_container = container.findAll('a', {'class':'item-title'})
    product_name = title_container[0].text
    #print(product_name)

    shipping_container = container.findAll('li', {'class':'price-ship'})
    shipping = shipping_container[0].text.strip()
    #print(shipping)

    try:
        price_container = container.findAll('li', {'class':'price-current'})
        price = price_container[0].text.strip()
        str(price)
        price = price.replace('|', '')
        price = price.replace('–', '')
        price = price.rstrip('\n')
        price.strip()
        print(price)
    except:
        pass

    f.write(brand + ',' + product_name.replace(',', '') + ',' + shipping + ',' + price + '\n')

f.close()

0 个答案:

没有答案