import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Touchscreen+Monitors' + \ '&categoryId=514&storeId=1&nodeId=7721&parentCategoryId=19' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('touchscreenmonitor', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Keyboards' + \ '&categoryId=63&storeId=1&nodeId=8650&parentCategoryId=234' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('keyboards', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Desktop+Memory&' + \ 'categoryId=147&storeId=1&nodeId=7611&parentCategoryId=17&' + \ 'isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('desktopmemory', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=HDMI+Cables' + \ '&categoryId=2809&storeId=1&nodeId=16742&parentCategoryId=184' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('hdmicables', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'https://m.newegg.com/ProductList?description=FHLEsA70dKzKoDqR2lBeblLSvjuwGkdtB%252fdjJTC%252f8VU%253d&storeid=1&categoryid=-1&nodeid=7627&storetype=2&subcategoryid=280&brandid=-1&nvalue=100007627&showseealldeals=False&itemcount=0&issubcategory=true&level=3' headers = {'User-Agent': 'Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'} pg1 = requests.get(baseurl, headers=headers).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('intelmotherboard', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Internal+SSD&' + \ 'categoryId=636&storeId=1&nodeId=8120&parentCategoryId=119&' + \ 'isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('ssd', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=' + \ 'Desktop+Graphics+Cards&categoryId=48&storeId=1&nodeId=7709' + \ '&parentCategoryId=38&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('gpus', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Mice' + \ '&categoryId=65&storeId=1&nodeId=8652&parentCategoryId=234' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('mice', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Web+Cams' + \ '&categoryId=152&storeId=1&nodeId=7794&parentCategoryId=29' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('webcams', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=' + \ 'Server%2fWorkstation+Systems&categoryId=386&storeId=1' + \ '&nodeId=7940&parentCategoryId=271&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('serversystems', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=' + \ 'Server%2fWorkstation+Systems&categoryId=386&storeId=1' + \ '&nodeId=7940&parentCategoryId=271&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('serversystems', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Xbox+360+Games&' + \ 'categoryId=516&storeId=8&nodeId=8091&parentCategoryId=323&' + \ 'isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('xbox360', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Firewalls' + \ '&categoryId=529&storeId=1&nodeId=8177&parentCategoryId=281' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('firewalls', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=LED+TV&categoryId=798' + \ '&storeId=10&nodeId=9260&parentCategoryId=264&isSubCategory=true' + \ '&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('ledtv', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Speakers' + \ '&categoryId=60&storeId=1&nodeId=7679&parentCategoryId=37' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('speakers', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Modems' + \ '&categoryId=18&storeId=1&nodeId=8185&parentCategoryId=281' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('modems', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Power+Supplies' + \ '&categoryId=58&storeId=1&nodeId=7657&parentCategoryId=32' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('psu', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Processors+-+' + \ 'Desktops&categoryId=343&storeId=1&nodeId=7671&' + \ 'parentCategoryId=34&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('cpus', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Mice' + \ '&categoryId=65&storeId=1&nodeId=8652&parentCategoryId=234' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('mice', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Internal+Hard+Drives' + \ '&categoryId=14&storeId=1&nodeId=7603&parentCategoryId=15' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('hdd', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Firewalls' + \ '&categoryId=529&storeId=1&nodeId=8177&parentCategoryId=281' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('firewalls', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Internal+SSD&' + \ 'categoryId=636&storeId=1&nodeId=8120&parentCategoryId=119&' + \ 'isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('ssd', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Case+Fans' + \ '&categoryId=573&storeId=1&nodeId=7998&parentCategoryId=11' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('casefans', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Computer+Cases' + \ '&categoryId=7&storeId=1&nodeId=7583&parentCategoryId=9' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('computercases', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Processors+-+' + \ 'Desktops&categoryId=343&storeId=1&nodeId=7671&' + \ 'parentCategoryId=34&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('cpus', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=' + \ 'Desktop+Graphics+Cards&categoryId=48&storeId=1&nodeId=7709' + \ '&parentCategoryId=38&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('gpus', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=LCD+TV&categoryId=411' + \ '&storeId=10&nodeId=7719&parentCategoryId=264&isSubCategory=true&' + \ 'categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('lcdtv', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = ( "http://m.newegg.com/ProductList?description=Wireless+Adapters" + "&categoryId=31&storeId=1&nodeId=10074&parentCategoryId=41" + "&isSubCategory=true&categoryType=1" ) pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ["%s&Page=%s" % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData("wirelessadapters", df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=' + \ 'External+Hard+Drives&categoryId=414&storeId=1&nodeId=7601' + \ '&parentCategoryId=15&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('externalhdd', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Plasma+TV&' + \ 'categoryId=385&storeId=10&nodeId=7713&parentCategoryId=264&' + \ 'isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('plasmatv', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Mac+Memory' + \ '&categoryId=551&storeId=1&nodeId=7968&parentCategoryId=17' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('macmemory', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=PS3%20Games' + \ '&categoryId=545&storeId=8&nodeId=8103&parentCategoryId=282' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('ps3', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=' + \ 'CPU+Fans+%26+Heatsinks&categoryId=574&storeId=1&nodeId=8000' + \ '&parentCategoryId=11&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('cpufans', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=LCD+TV&categoryId=411' + \ '&storeId=10&nodeId=7719&parentCategoryId=264&isSubCategory=true&' + \ 'categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('lcdtv', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Intel+Motherboards' + \ '&categoryId=280&storeId=1&nodeId=7627&parentCategoryId=20' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('intelmotherboard', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=' + \ 'CPU+Fans+%26+Heatsinks&categoryId=574&storeId=1&nodeId=8000' + \ '&parentCategoryId=11&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('cpufans', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Desktop+Memory&' + \ 'categoryId=147&storeId=1&nodeId=7611&parentCategoryId=17&' + \ 'isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('desktopmemory', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Web+Cams' + \ '&categoryId=152&storeId=1&nodeId=7794&parentCategoryId=29' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('webcams', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Laptops+%2f+' + \ 'Notebooks&categoryId=32&storeId=3&nodeId=6740&' + \ 'parentCategoryId=223&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('laptop', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=HDMI+Cables' + \ '&categoryId=2809&storeId=1&nodeId=16742&parentCategoryId=184' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('hdmicables', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=USB+Flash+Drives' + \ '&categoryId=522&storeId=1&nodeId=7960&parentCategoryId=324' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('usbflashdrives', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Wireless+Adapters' + \ '&categoryId=31&storeId=1&nodeId=10074&parentCategoryId=41' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('wirelessadapters', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = ( "http://m.newegg.com/ProductList?description=Power+Supplies" + "&categoryId=58&storeId=1&nodeId=7657&parentCategoryId=32" + "&isSubCategory=true&categoryType=1" ) pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ["%s&Page=%s" % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData("psu", df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=AMD+Motherboards' + \ '&categoryId=22&storeId=1&nodeId=7625&parentCategoryId=20' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('amdmotherboard', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=LCD+Monitors' + \ '&categoryId=20&storeId=1&nodeId=7617&parentCategoryId=19' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('lcdmonitor', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Internal+Hard+Drives' + \ '&categoryId=14&storeId=1&nodeId=7603&parentCategoryId=15' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('hdd', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=Desktop+NAS' + \ '&categoryId=124&storeId=1&nodeId=8028&parentCategoryId=241' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('desktopnas', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'https://m.newegg.com/productlist?description=nVjkbn88TPpxbYCO44j7AJ7lKvYiECglej4lhl3FXQM%253d&storeid=3&categoryid=-1&nodeid=6740&storetype=2&subcategoryid=32&brandid=-1&nvalue=100006740&showseealldeals=False&itemcount=0&issubcategory=true&level=3' headers = { 'User-Agent': 'Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30' } pg1 = requests.get(baseurl, headers=headers).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('laptop', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Mac+Memory' + \ '&categoryId=551&storeId=1&nodeId=7968&parentCategoryId=17' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('macmemory', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Plasma+TV&' + \ 'categoryId=385&storeId=10&nodeId=7713&parentCategoryId=264&' + \ 'isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('plasmatv', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages,BoolToInt,getPIDS,getData,insertData baseurl = 'http://m.newegg.com/ProductList?description=Laptop+Hard+Drives' + \ '&categoryId=380&storeId=1&nodeId=7605&parentCategoryId=15' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('laptophdd', df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = ( "http://m.newegg.com/ProductList?description=Computer+Cases" + "&categoryId=7&storeId=1&nodeId=7583&parentCategoryId=9" + "&isSubCategory=true&categoryType=1" ) pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ["%s&Page=%s" % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData("computercases", df)
import lxml.html import requests from neweggpy.nefuncs import IterPages, BoolToInt, getPIDS, getData, insertData baseurl = 'http://m.newegg.com/ProductList?description=PS3%20Games' + \ '&categoryId=545&storeId=8&nodeId=8103&parentCategoryId=282' + \ '&isSubCategory=true&categoryType=1' pg1 = requests.get(baseurl).content root1 = lxml.html.fromstring(pg1) page_count = IterPages(root1) URLs = ['%s&Page=%s' % (baseurl, pgnum) for pgnum in range(1, page_count + 1)] # FETCH AND PARSE THE DATA pids = getPIDS(URLs, root1) df = getData(pids) # PUT DATA IN DATABASE insertData('ps3', df)