In [1]:
$stdout.sync = true

require "httparty"
require "nokogiri"
require 'sqlite3'
require 'time'
Out[1]:
false
In [2]:
# Web user agent settings
ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
Out[2]:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
In [3]:
# get .txt file search keywords (into list)
file = File.open("files/Search Keywords.txt", "r")
content = file.read
file.close
keywords = content.split("\n")
puts "The following keywords will be searched for: " + keywords.join(", ")
The following keywords will be searched for: shoes, iphone, green
In [4]:
# connect to database
db = SQLite3::Database.open 'files/Database.db'
Out[4]:
#<SQLite3::Database:0x000001732305dd58 @tracefunc=nil, @authorizer=nil, @encoding=nil, @busy_handler=nil, @collations={}, @functions={}, @results_as_hash=nil, @type_translation=nil, @type_translator=#<Proc:0x0000017324f2e778 C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sqlite3-1.6.8-x64-mingw-ucrt/lib/sqlite3/database.rb:732 (lambda)>, @readonly=false>
In [5]:
# define URL
urlBaseToQuery = ["https://newyork.craigslist.org/search/sss?query=", "https://chicago.craigslist.org/search/sss?query="]
urlQueryToIndex = "#search=1~gallery~"
urlPostIndex = "~0"
Out[5]:
"~0"
In [6]:
# loop through websites
urlBaseToQuery.each do |urlBase|

  # loop throigh keywords
  keywords.each do |keyword|

    pageCount = 0
    while pageCount < 5

      # create full URL
      fullURL = urlBase + keyword + urlQueryToIndex + pageCount.to_s + urlPostIndex

      # visit website
      puts "Visiting this URL: " + fullURL
      response = HTTParty.get(fullURL,{headers: { "User-Agent" => ua},})
      html_doc = Nokogiri::HTML(response.body)

      # get URLs
      allURLs = html_doc.xpath("//a/@href").map(&:text)
      listingURLs = allURLs.reject {|item|!item.match(/\/[0-9]{6,}\.html/)}
      listingURLs = listingURLs.uniq
      puts listingURLs.length.to_s + " listing urls were found"

      # add urls to database (with timestamp)
      listingURLs.each do |url|

        time_str = Time.now.strftime("%Y-%m-%d %H:%M:%S")
        db.execute "INSERT INTO urlsToCrawl (URL, Keyword, FoundAt, HasBeenVisited) VALUES (?, ?, ?, ?)", [url, keyword, time_str, 0]

      end

      pageCount += 1

    end

  end

end
Visiting this URL: https://newyork.craigslist.org/search/sss?query=shoes#search=1~gallery~0~0
291 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=shoes#search=1~gallery~1~0
291 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=shoes#search=1~gallery~2~0
291 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=shoes#search=1~gallery~3~0
291 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=shoes#search=1~gallery~4~0
291 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=iphone#search=1~gallery~0~0
342 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=iphone#search=1~gallery~1~0
342 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=iphone#search=1~gallery~2~0
342 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=iphone#search=1~gallery~3~0
342 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=iphone#search=1~gallery~4~0
342 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=green#search=1~gallery~0~0
335 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=green#search=1~gallery~1~0
335 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=green#search=1~gallery~2~0
335 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=green#search=1~gallery~3~0
335 listing urls were found
Visiting this URL: https://newyork.craigslist.org/search/sss?query=green#search=1~gallery~4~0
335 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=shoes#search=1~gallery~0~0
336 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=shoes#search=1~gallery~1~0
336 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=shoes#search=1~gallery~2~0
336 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=shoes#search=1~gallery~3~0
336 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=shoes#search=1~gallery~4~0
336 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=iphone#search=1~gallery~0~0
281 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=iphone#search=1~gallery~1~0
281 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=iphone#search=1~gallery~2~0
281 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=iphone#search=1~gallery~3~0
281 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=iphone#search=1~gallery~4~0
281 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=green#search=1~gallery~0~0
340 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=green#search=1~gallery~1~0
340 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=green#search=1~gallery~2~0
340 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=green#search=1~gallery~3~0
340 listing urls were found
Visiting this URL: https://chicago.craigslist.org/search/sss?query=green#search=1~gallery~4~0
340 listing urls were found
Out[6]:
["https://newyork.craigslist.org/search/sss?query=", "https://chicago.craigslist.org/search/sss?query="]
In [7]:
# remove duplicate URLs and close database
db.execute "DELETE FROM urlsToCrawl WHERE EXISTS (SELECT 1 FROM urlsToCrawl p2 WHERE urlsToCrawl.URL = p2.url AND urlsToCrawl.rowid > p2.rowid);"
Out[7]:
[]
In [8]:
# Get unvisited URLs
unvisitedURLsQuery = db.execute "SELECT URL FROM urlsToCrawl where HasBeenVisited = 0"

unvisitedURLsList = []

unvisitedURLsQuery.each do |row|
  unvisitedURLsList << row[0]
end
Out[8]:
[["https://chicago.craigslist.org/chc/mob/d/chicago-iphone-14-pro-max-1tb-near-mint/7706024370.html"], ["https://chicago.craigslist.org/nwc/mob/d/dundee-iphone-6s-unlacked/7710912993.html"], ["https://chicago.craigslist.org/chc/mod/d/chicago-iphone-repair-store/7714778023.html"], ["https://chicago.craigslist.org/nch/ele/d/elk-grove-village-unlocked-iphone-11/7708144555.html"], ["https://chicago.craigslist.org/wcl/mob/d/westmont-magsafe-case-iphone-13-pro-max/7714670769.html"], ["https://chicago.craigslist.org/chc/mob/d/golf-iphone-unlocked-64gb/7708184813.html"], ["https://chicago.craigslist.org/chc/mob/d/golf-iphone-unlocked-256gb/7708455623.html"], ["https://chicago.craigslist.org/chc/mob/d/golf-iphone-xs-unlocked-256gb/7710740066.html"], ["https://chicago.craigslist.org/chc/mob/d/golf-iphone-12-pro-max-unlocked-256gb/7710741660.html"], ["https://chicago.craigslist.org/chc/mob/d/golf-iphone-13-pro-max-unlock-512gb/7706494333.html"], ["https://chicago.craigslist.org/nwc/ele/d/mundelein-iphone-plus-screen-protector/7705096433.html"], ["https://chicago.craigslist.org/nwc/mob/d/hoffman-estates-iphone-14-pro-max-256gb/7714546415.html"], ["https://chicago.craigslist.org/chc/mob/d/chicago-iphone-15-pro-max/7712861335.html"], ["https://chicago.craigslist.org/sox/mob/d/romeoville-iphone-12-white-64gb-great/7714482321.html"], ["https://chicago.craigslist.org/chc/mod/d/chicago-iphone-repair-service/7714457005.html"], ["https://chicago.craigslist.org/chc/mob/d/chicago-iphone/7714428346.html"], ["https://chicago.craigslist.org/nwi/mob/d/munster-iphone-model-1332-cdma-unlocked/7714382473.html"], ["https://chicago.craigslist.org/nwi/mob/d/munster-iphone-model-1429-cdma-gsm/7714385420.html"], ["https://chicago.craigslist.org/nwc/mob/d/libertyville-iphone-plus/7714261991.html"], ["https://chicago.craigslist.org/nwc/mob/d/libertyville-2x-iphone/7714261578.html"], ["https://chicago.craigslist.org/nwc/mob/d/des-plaines-iphone-lightning-to-usb/7707352043.html"], ["https://chicago.craigslist.org/chc/mob/d/chicago-fuse-reels-5w-iphone-lightning/7714227521.html"], ["https://chicago.craigslist.org/nch/ele/d/lake-forest-iphone-12-pro/7709484855.html"], ["https://chicago.craigslist.org/nch/ele/d/lake-zurich-iphone/7711649582.html"], ["https://chicago.craigslist.org/nch/mob/d/glencoe-apple-iphone-12-pro-max-256gb/7714206402.html"], ["https://chicago.craigslist.org/chc/ele/d/bellwood-iphone-12-unlocked-64gb-black/7714201715.html"], ["https://chicago.craigslist.org/chc/mob/d/chicago-iphone-15-pro-max-256g/7714177199.html"], ["https://chicago.craigslist.org/chc/mob/d/chicago-jetech-screen-protector-for/7714163364.html"], ["https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714158227.html"], ["https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714157935.html"], ["https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714157591.html"], ["https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714157277.html"], ["https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714156902.html"], ["https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714156548.html"], ["https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714156154.html"], ["https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714155740.html"], ["https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714155358.html"], ["https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714155026.html"], ["https://chicago.craigslist.org/chc/wad/d/chicago-buying-iphone-macbook-ipad/7714109628.html"], ["https://chicago.craigslist.org/chc/ele/d/chicago-iphone-14pro-max-256gb/7709464621.html"], ["https://chicago.craigslist.org/chc/mob/d/chicago-designer-luxury-case-for-iphone/7704201912.html"], ["https://chicago.craigslist.org/chc/mod/d/chicago-iphone-broken-screen-repair/7714028483.html"], ["https://chicago.craigslist.org/nch/mob/d/chicago-iphone-13-pro-max/7713947507.html"], ["https://chicago.craigslist.org/nwc/mob/d/glen-ellyn-sony-rdp-x50ipblk-dlo/7712565934.html"], ["https://chicago.craigslist.org/nwc/mob/d/lincolnshire-iphone-6s-in-excellent/7712887654.html"], ["https://chicago.craigslist.org/wcl/mob/d/naperville-factory-unlocked-iphone-plus/7713935868.html"], ["https://chicago.craigslist.org/wcl/mob/d/naperville-factory-unlocked-iphone-12/7713935773.html"], ["https://chicago.craigslist.org/nch/ele/d/deerfield-beautiful-slick-original/7713849435.html"], ["https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7713845034.html"], ["https://chicago.craigslist.org/wcl/wad/d/naperville-chicago-apple-iphone-cash/7713840028.html"]]
In [9]:
unvisitedURLsList.each do |currentUrl|

  puts "Visiting this URL: " + currentUrl

  # visit URL
  response = HTTParty.get(currentUrl,{headers: { "User-Agent" => ua},})
  html_doc = Nokogiri::HTML(response.body)

  # pause for 3 seconds for every iteration of loop (to avoid blocking)
  sleep(3)

  # check if listing has been removed
  deletedMessage = html_doc.at_xpath("//div[@class='removed']")
  if deletedMessage.nil?

    # scrape details
    title = html_doc.at_xpath("//title").text
    title = title.empty? ? '' : title

    postId = html_doc.xpath("//p[@class='postinginfo'][1]").text
    regexMatch = postId.match(/([0-9]{5,})/)
    postId = regexMatch ? regexMatch[1] : ''

    postedAge = html_doc.xpath("//p[@class='postinginfo reveal'][1]/time[@class='date timeago']").text
    regexMatch = postedAge.match(/([0-9\-]{10} [0-9:]{5})/)
    postedAge = regexMatch ? regexMatch[1] : ''

    updatedAge = html_doc.xpath("//p[@class='postinginfo reveal'][2]/time[@class='date timeago']").text
    regexMatch = updatedAge.match(/([0-9\-]{10} [0-9:]{5})/)
    updatedAge = regexMatch ? regexMatch[1] : ''

    puts "These details have been scraped...\nTitle: " + title + "\nPost ID: " + postId + "\nPosted at: " + postedAge + "\nUpdated at: " + updatedAge

    # enter scraped details into database, updated urlsToCrawl table
    time_str = Time.now.strftime("%Y-%m-%d %H:%M:%S")
    db.execute "INSERT INTO listings (url, title, post_id, post_age, updated_age, visited_at) VALUES (?, ?, ?, ?, ?, ?)", [currentUrl, title, postId, postedAge, updatedAge, time_str]
    db.execute "UPDATE urlsToCrawl SET HasBeenVisited=1, VisitedAndDead=0 WHERE URL = ?", [currentUrl]

  else

    db.execute "UPDATE urlsToCrawl SET HasBeenVisited=1, VisitedAndDead=1 WHERE URL = ?", [currentUrl]
    next # skip dead listings

  end

end
Visiting this URL: https://chicago.craigslist.org/chc/mob/d/chicago-iphone-14-pro-max-1tb-near-mint/7706024370.html
These details have been scraped...
Title: iPhone 14 Pro Max 1TB Near Mint - cell phones - by owner - electronics sale - craigslist
Post ID: 7706024370
Posted at: 2024-01-10 01:38
Updated at: 2024-02-05 20:42
Visiting this URL: https://chicago.craigslist.org/nwc/mob/d/dundee-iphone-6s-unlacked/7710912993.html
These details have been scraped...
Title: iPhone 6s -Unlacked - cell phones - by owner - electronics sale - craigslist
Post ID: 7710912993
Posted at: 2024-01-24 17:40
Updated at: 2024-02-07 19:10
Visiting this URL: https://chicago.craigslist.org/chc/mod/d/chicago-iphone-repair-store/7714778023.html
These details have been scraped...
Title: iPhone Repair Store - cell phones - by dealer - electronics mobile sale - craigslist
Post ID: 7714778023
Posted at: 2024-02-05 15:09
Updated at: 
Visiting this URL: https://chicago.craigslist.org/nch/ele/d/elk-grove-village-unlocked-iphone-11/7708144555.html
These details have been scraped...
Title: UNLOCKED iPhone 11 Pro 512GB Space Grey ATT - electronics - by owner - sale - craigslist
Post ID: 7708144555
Posted at: 2024-01-16 13:06
Updated at: 2024-02-05 14:56
Visiting this URL: https://chicago.craigslist.org/wcl/mob/d/westmont-magsafe-case-iphone-13-pro-max/7714670769.html
These details have been scraped...
Title: MagSafe Case iPhone 13 Pro Max - cell phones - by owner - electronics sale - craigslist
Post ID: 7714670769
Posted at: 2024-02-05 11:09
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/mob/d/golf-iphone-unlocked-64gb/7708184813.html
These details have been scraped...
Title: iPhone 8 UNLOCKED 64GB - cell phones - by owner - electronics sale - craigslist
Post ID: 7708184813
Posted at: 2024-01-16 14:43
Updated at: 2024-02-05 09:22
Visiting this URL: https://chicago.craigslist.org/chc/mob/d/golf-iphone-unlocked-256gb/7708455623.html
These details have been scraped...
Title: iPhone X Unlocked 256GB - cell phones - by owner - electronics sale - craigslist
Post ID: 7708455623
Posted at: 2024-01-17 12:11
Updated at: 2024-02-05 09:22
Visiting this URL: https://chicago.craigslist.org/chc/mob/d/golf-iphone-xs-unlocked-256gb/7710740066.html
These details have been scraped...
Title: iPhone XS Unlocked 256GB - cell phones - by owner - electronics sale - craigslist
Post ID: 7710740066
Posted at: 2024-01-24 10:39
Updated at: 2024-02-05 09:22
Visiting this URL: https://chicago.craigslist.org/chc/mob/d/golf-iphone-12-pro-max-unlocked-256gb/7710741660.html
These details have been scraped...
Title: iPhone 12 Pro Max UNLOCKED 256GB - cell phones - by owner - electronics sale - craigslist
Post ID: 7710741660
Posted at: 2024-01-24 10:43
Updated at: 2024-02-05 09:23
Visiting this URL: https://chicago.craigslist.org/chc/mob/d/golf-iphone-13-pro-max-unlock-512gb/7706494333.html
These details have been scraped...
Title: iPhone 13 PRO MAX UNLOCK 512GB - cell phones - by owner - electronics sale - craigslist
Post ID: 7706494333
Posted at: 2024-01-11 11:48
Updated at: 2024-02-05 09:22
Visiting this URL: https://chicago.craigslist.org/nwc/ele/d/mundelein-iphone-plus-screen-protector/7705096433.html
These details have been scraped...
Title: Iphone 8 plus screen protector - electronics - by owner - sale - craigslist
Post ID: 7705096433
Posted at: 2024-01-07 10:02
Updated at: 2024-02-05 08:31
Visiting this URL: https://chicago.craigslist.org/nwc/mob/d/hoffman-estates-iphone-14-pro-max-256gb/7714546415.html
These details have been scraped...
Title: iPhone 14 Pro Max 256GB white - cell phones - by owner - electronics sale - craigslist
Post ID: 7714546415
Posted at: 2024-02-04 23:22
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/mob/d/chicago-iphone-15-pro-max/7712861335.html
These details have been scraped...
Title: iPhone 15 pro max - cell phones - by owner - electronics sale - craigslist
Post ID: 7712861335
Posted at: 2024-01-30 17:46
Updated at: 2024-02-04 23:43
Visiting this URL: https://chicago.craigslist.org/sox/mob/d/romeoville-iphone-12-white-64gb-great/7714482321.html
These details have been scraped...
Title: Iphone 12 White 64gb Great Condition - cell phones - by owner - electronics sale - craigslist
Post ID: 7714482321
Posted at: 2024-02-04 17:37
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/mod/d/chicago-iphone-repair-service/7714457005.html
These details have been scraped...
Title: iPhone Repair Service - cell phones - by dealer - electronics mobile sale - craigslist
Post ID: 7714457005
Posted at: 2024-02-04 16:13
Updated at: 2024-02-04 16:13
Visiting this URL: https://chicago.craigslist.org/chc/mob/d/chicago-iphone/7714428346.html
These details have been scraped...
Title: iPhone X - cell phones - by owner - electronics sale - craigslist
Post ID: 7714428346
Posted at: 2024-02-04 14:48
Updated at: 
Visiting this URL: https://chicago.craigslist.org/nwi/mob/d/munster-iphone-model-1332-cdma-unlocked/7714382473.html
These details have been scraped...
Title: iPhone 4 Model A 1332 CDMA Unlocked GSM - cell phones - by owner - electronics sale - craigslist
Post ID: 7714382473
Posted at: 2024-02-04 12:39
Updated at: 2024-02-04 12:48
Visiting this URL: https://chicago.craigslist.org/nwi/mob/d/munster-iphone-model-1429-cdma-gsm/7714385420.html
These details have been scraped...
Title: iPhone 5 Model A 1429 CDMA+ GSM Unlocked Model Preowned (16GB) - cell phones - by owner - electronics sale - craigslist
Post ID: 7714385420
Posted at: 2024-02-04 12:48
Updated at: 
Visiting this URL: https://chicago.craigslist.org/nwc/mob/d/libertyville-iphone-plus/7714261991.html
These details have been scraped...
Title: iPhone 6 plus - cell phones - by owner - electronics sale - craigslist
Post ID: 7714261991
Posted at: 2024-02-04 00:21
Updated at: 
Visiting this URL: https://chicago.craigslist.org/nwc/mob/d/libertyville-2x-iphone/7714261578.html
These details have been scraped...
Title: 2x iPhone 6 - cell phones - by owner - electronics sale - craigslist
Post ID: 7714261578
Posted at: 2024-02-04 00:15
Updated at: 
Visiting this URL: https://chicago.craigslist.org/nwc/mob/d/des-plaines-iphone-lightning-to-usb/7707352043.html
These details have been scraped...
Title: Iphone Lightning To USB-C Adapter ; Lightning Male To USB C Female; fo - cell phones - by owner - electronics sale -...
Post ID: 7707352043
Posted at: 2024-01-13 23:37
Updated at: 2024-02-07 22:38
Visiting this URL: https://chicago.craigslist.org/chc/mob/d/chicago-fuse-reels-5w-iphone-lightning/7714227521.html
These details have been scraped...
Title: Fuse Reels 5W iPhone Lightning Cable Charger Organizer - cell phones - by owner - electronics sale - craigslist
Post ID: 7714227521
Posted at: 2024-02-03 19:50
Updated at: 
Visiting this URL: https://chicago.craigslist.org/nch/ele/d/lake-forest-iphone-12-pro/7709484855.html
These details have been scraped...
Title: Iphone 12 pro - electronics - by owner - sale - craigslist
Post ID: 7709484855
Posted at: 2024-01-20 12:33
Updated at: 2024-02-03 18:53
Visiting this URL: https://chicago.craigslist.org/nch/ele/d/lake-zurich-iphone/7711649582.html
These details have been scraped...
Title: Iphone x - electronics - by owner - sale - craigslist
Post ID: 7711649582
Posted at: 2024-01-26 21:46
Updated at: 2024-02-03 18:50
Visiting this URL: https://chicago.craigslist.org/nch/mob/d/glencoe-apple-iphone-12-pro-max-256gb/7714206402.html
These details have been scraped...
Title: Apple iPhone 12 Pro Max 256GB Graphite - Carrier Neutral - cell phones - by owner - electronics sale - craigslist
Post ID: 7714206402
Posted at: 2024-02-03 18:15
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/ele/d/bellwood-iphone-12-unlocked-64gb-black/7714201715.html
These details have been scraped...
Title: iphone 12 unlocked 64gb black - electronics - by owner - sale - craigslist
Post ID: 7714201715
Posted at: 2024-02-03 17:59
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/mob/d/chicago-iphone-15-pro-max-256g/7714177199.html
These details have been scraped...
Title: iphone 15 Pro max 256g - cell phones - by owner - electronics sale - craigslist
Post ID: 7714177199
Posted at: 2024-02-03 16:32
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/mob/d/chicago-jetech-screen-protector-for/7714163364.html
These details have been scraped...
Title: JETech Screen Protector for iPhone 11 Pro Max and iPhone Xs Max 6.5" - cell phones - by owner - electronics sale -...
Post ID: 7714163364
Posted at: 2024-02-03 15:50
Updated at: 2024-02-07 22:24
Visiting this URL: https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714158227.html
These details have been scraped...
Title: Apple iPhone buyer cash we buy iPhones cash sell your iPhone cash - wanted - by dealer - sale - craigslist
Post ID: 7714158227
Posted at: 2024-02-03 15:35
Updated at: 2024-02-03 15:35
Visiting this URL: https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714157935.html
These details have been scraped...
Title: Apple iPhone buyer cash we buy iPhones cash sell your iPhone cash - wanted - by dealer - sale - craigslist
Post ID: 7714157935
Posted at: 2024-02-03 15:34
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714157591.html
These details have been scraped...
Title: Apple iPhone buyer cash we buy iPhones cash sell your iPhone cash - wanted - by dealer - sale - craigslist
Post ID: 7714157591
Posted at: 2024-02-03 15:33
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714157277.html
These details have been scraped...
Title: Apple iPhone buyer cash we buy iPhones cash sell your iPhone cash - wanted - by dealer - sale - craigslist
Post ID: 7714157277
Posted at: 2024-02-03 15:32
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714156902.html
These details have been scraped...
Title: Apple iPhone buyer cash we buy iPhones cash sell your iPhone cash - wanted - by dealer - sale - craigslist
Post ID: 7714156902
Posted at: 2024-02-03 15:31
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714156548.html
These details have been scraped...
Title: Apple iPhone buyer cash we buy iPhones cash sell your iPhone cash - wanted - by dealer - sale - craigslist
Post ID: 7714156548
Posted at: 2024-02-03 15:29
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714156154.html
These details have been scraped...
Title: Apple iPhone buyer cash we buy iPhones cash sell your iPhone cash - wanted - by dealer - sale - craigslist
Post ID: 7714156154
Posted at: 2024-02-03 15:28
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714155740.html
These details have been scraped...
Title: Apple iPhone buyer cash we buy iPhones cash sell your iPhone cash - wanted - by dealer - sale - craigslist
Post ID: 7714155740
Posted at: 2024-02-03 15:27
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714155358.html
These details have been scraped...
Title: Apple iPhone buyer cash we buy iPhones cash sell your iPhone cash - wanted - by dealer - sale - craigslist
Post ID: 7714155358
Posted at: 2024-02-03 15:26
Updated at: 2024-02-03 15:26
Visiting this URL: https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714155026.html
These details have been scraped...
Title: Apple iPhone buyer cash we buy iPhones cash sell your iPhone cash - wanted - by dealer - sale - craigslist
Post ID: 7714155026
Posted at: 2024-02-03 15:25
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/wad/d/chicago-buying-iphone-macbook-ipad/7714109628.html
These details have been scraped...
Title: Buying iphone - MacBook - iPad - wanted - by dealer - sale - craigslist
Post ID: 7714109628
Posted at: 2024-02-03 13:30
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/ele/d/chicago-iphone-14pro-max-256gb/7709464621.html
These details have been scraped...
Title: iPhone 14Pro Max 256GB - electronics - by owner - sale - craigslist
Post ID: 7709464621
Posted at: 2024-01-20 11:48
Updated at: 2024-02-03 11:54
Visiting this URL: https://chicago.craigslist.org/chc/mob/d/chicago-designer-luxury-case-for-iphone/7704201912.html
These details have been scraped...
Title: Designer Luxury Case for iPhone 14 Pro - cell phones - by owner - electronics sale - craigslist
Post ID: 7704201912
Posted at: 2024-01-04 14:08
Updated at: 2024-02-03 11:38
Visiting this URL: https://chicago.craigslist.org/chc/mod/d/chicago-iphone-broken-screen-repair/7714028483.html
These details have been scraped...
Title: IPHONE BROKEN SCREEN repair starts - cell phones - by dealer - electronics mobile sale - craigslist
Post ID: 7714028483
Posted at: 2024-02-03 10:25
Updated at: 
Visiting this URL: https://chicago.craigslist.org/nch/mob/d/chicago-iphone-13-pro-max/7713947507.html
These details have been scraped...
Title: iphone 13 pro max - cell phones - by owner - electronics sale - craigslist
Post ID: 7713947507
Posted at: 2024-02-03 01:42
Updated at: 
Visiting this URL: https://chicago.craigslist.org/nwc/mob/d/glen-ellyn-sony-rdp-x50ipblk-dlo/7712565934.html
These details have been scraped...
Title: Sony RDP-X50iPBLK & DLO Speaker Dock &Yamaha YDS-12 iPhone/iPod Dock - cell phones - by owner - electronics sale -...
Post ID: 7712565934
Posted at: 2024-01-29 20:45
Updated at: 2024-02-02 23:56
Visiting this URL: https://chicago.craigslist.org/nwc/mob/d/lincolnshire-iphone-6s-in-excellent/7712887654.html
These details have been scraped...
Title: iphone 6s in excellent condition - cell phones - by owner - electronics sale - craigslist
Post ID: 7712887654
Posted at: 2024-01-30 19:21
Updated at: 2024-02-02 23:47
Visiting this URL: https://chicago.craigslist.org/wcl/mob/d/naperville-factory-unlocked-iphone-plus/7713935868.html
These details have been scraped...
Title: Factory Unlocked iPhone 7 Plus 32 GB Gold like New - cell phones - by owner - electronics sale - craigslist
Post ID: 7713935868
Posted at: 2024-02-02 23:16
Updated at: 
Visiting this URL: https://chicago.craigslist.org/wcl/mob/d/naperville-factory-unlocked-iphone-12/7713935773.html
These details have been scraped...
Title: Factory Unlocked iPhone 12 Pro Max 128GB Pacific Blue - cell phones - by owner - electronics sale - craigslist
Post ID: 7713935773
Posted at: 2024-02-02 23:15
Updated at: 
Visiting this URL: https://chicago.craigslist.org/nch/ele/d/deerfield-beautiful-slick-original/7713849435.html
These details have been scraped...
Title: Beautiful slick original Apple iPhone 16GB, 579C - A1303A, White - electronics - by owner - sale - craigslist
Post ID: 7713849435
Posted at: 2024-02-02 16:46
Updated at: 
Visiting this URL: https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7713845034.html
These details have been scraped...
Title: Apple iPhone buyer cash we buy iPhones cash sell your iPhone cash - wanted - by dealer - sale - craigslist
Post ID: 7713845034
Posted at: 2024-02-02 16:32
Updated at: 
Visiting this URL: https://chicago.craigslist.org/wcl/wad/d/naperville-chicago-apple-iphone-cash/7713840028.html
These details have been scraped...
Title: Chicago apple iPhone cash buyer we buy iPhones cash top dollar - wanted - by dealer - sale - craigslist
Post ID: 7713840028
Posted at: 2024-02-02 16:18
Updated at: 
Out[9]:
["https://chicago.craigslist.org/chc/mob/d/chicago-iphone-14-pro-max-1tb-near-mint/7706024370.html", "https://chicago.craigslist.org/nwc/mob/d/dundee-iphone-6s-unlacked/7710912993.html", "https://chicago.craigslist.org/chc/mod/d/chicago-iphone-repair-store/7714778023.html", "https://chicago.craigslist.org/nch/ele/d/elk-grove-village-unlocked-iphone-11/7708144555.html", "https://chicago.craigslist.org/wcl/mob/d/westmont-magsafe-case-iphone-13-pro-max/7714670769.html", "https://chicago.craigslist.org/chc/mob/d/golf-iphone-unlocked-64gb/7708184813.html", "https://chicago.craigslist.org/chc/mob/d/golf-iphone-unlocked-256gb/7708455623.html", "https://chicago.craigslist.org/chc/mob/d/golf-iphone-xs-unlocked-256gb/7710740066.html", "https://chicago.craigslist.org/chc/mob/d/golf-iphone-12-pro-max-unlocked-256gb/7710741660.html", "https://chicago.craigslist.org/chc/mob/d/golf-iphone-13-pro-max-unlock-512gb/7706494333.html", "https://chicago.craigslist.org/nwc/ele/d/mundelein-iphone-plus-screen-protector/7705096433.html", "https://chicago.craigslist.org/nwc/mob/d/hoffman-estates-iphone-14-pro-max-256gb/7714546415.html", "https://chicago.craigslist.org/chc/mob/d/chicago-iphone-15-pro-max/7712861335.html", "https://chicago.craigslist.org/sox/mob/d/romeoville-iphone-12-white-64gb-great/7714482321.html", "https://chicago.craigslist.org/chc/mod/d/chicago-iphone-repair-service/7714457005.html", "https://chicago.craigslist.org/chc/mob/d/chicago-iphone/7714428346.html", "https://chicago.craigslist.org/nwi/mob/d/munster-iphone-model-1332-cdma-unlocked/7714382473.html", "https://chicago.craigslist.org/nwi/mob/d/munster-iphone-model-1429-cdma-gsm/7714385420.html", "https://chicago.craigslist.org/nwc/mob/d/libertyville-iphone-plus/7714261991.html", "https://chicago.craigslist.org/nwc/mob/d/libertyville-2x-iphone/7714261578.html", "https://chicago.craigslist.org/nwc/mob/d/des-plaines-iphone-lightning-to-usb/7707352043.html", "https://chicago.craigslist.org/chc/mob/d/chicago-fuse-reels-5w-iphone-lightning/7714227521.html", "https://chicago.craigslist.org/nch/ele/d/lake-forest-iphone-12-pro/7709484855.html", "https://chicago.craigslist.org/nch/ele/d/lake-zurich-iphone/7711649582.html", "https://chicago.craigslist.org/nch/mob/d/glencoe-apple-iphone-12-pro-max-256gb/7714206402.html", "https://chicago.craigslist.org/chc/ele/d/bellwood-iphone-12-unlocked-64gb-black/7714201715.html", "https://chicago.craigslist.org/chc/mob/d/chicago-iphone-15-pro-max-256g/7714177199.html", "https://chicago.craigslist.org/chc/mob/d/chicago-jetech-screen-protector-for/7714163364.html", "https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714158227.html", "https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714157935.html", "https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714157591.html", "https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714157277.html", "https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714156902.html", "https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714156548.html", "https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714156154.html", "https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714155740.html", "https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714155358.html", "https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7714155026.html", "https://chicago.craigslist.org/chc/wad/d/chicago-buying-iphone-macbook-ipad/7714109628.html", "https://chicago.craigslist.org/chc/ele/d/chicago-iphone-14pro-max-256gb/7709464621.html", "https://chicago.craigslist.org/chc/mob/d/chicago-designer-luxury-case-for-iphone/7704201912.html", "https://chicago.craigslist.org/chc/mod/d/chicago-iphone-broken-screen-repair/7714028483.html", "https://chicago.craigslist.org/nch/mob/d/chicago-iphone-13-pro-max/7713947507.html", "https://chicago.craigslist.org/nwc/mob/d/glen-ellyn-sony-rdp-x50ipblk-dlo/7712565934.html", "https://chicago.craigslist.org/nwc/mob/d/lincolnshire-iphone-6s-in-excellent/7712887654.html", "https://chicago.craigslist.org/wcl/mob/d/naperville-factory-unlocked-iphone-plus/7713935868.html", "https://chicago.craigslist.org/wcl/mob/d/naperville-factory-unlocked-iphone-12/7713935773.html", "https://chicago.craigslist.org/nch/ele/d/deerfield-beautiful-slick-original/7713849435.html", "https://chicago.craigslist.org/chc/wad/d/chicago-apple-iphone-buyer-cash-we-buy/7713845034.html", "https://chicago.craigslist.org/wcl/wad/d/naperville-chicago-apple-iphone-cash/7713840028.html"]
In [10]:
db.close
Out[10]:
#<SQLite3::Database:0x000001732305dd58 @tracefunc=nil, @authorizer=nil, @encoding=#<Encoding:UTF-8>, @busy_handler=nil, @collations={}, @functions={}, @results_as_hash=nil, @type_translation=nil, @type_translator=#<Proc:0x0000017324f2e778 C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sqlite3-1.6.8-x64-mingw-ucrt/lib/sqlite3/database.rb:732 (lambda)>, @readonly=false>