You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TLDR; the price is being stripped of the dollar sign ($), but no the comma (,). e.g. $2,500 -> 2,500 = error
System: Ubuntu 18.04.5 LTS
Code/Commit Version: Jan 20, 2019
Thanks for making this available! Going through your docs and ran installed it according to instructions. Ran crawlCities.py and finished in 25 seconds. Went to run scrapeVehicles.py, but then it fails with the following error:
Scraping vehicles from [city], 29 cities remain
Gathering entries 0 through 120
0 entries tossed due to inadequate data
Traceback (most recent call last):
File "scrapeVehicles.py", line 286, in <module>
main()
File "scrapeVehicles.py", line 282, in main
runScraper()
File "scrapeVehicles.py", line 110, in runScraper
vehicleDict["price"] = int(item[1].strip("$"))
ValueError: invalid literal for int() with base 10: '2,500'
Suggested fix (or something along these lines because this allows me to run the code):
scrapeVehicles.py @ line 110
FROM : vehicleDict["price"] = int(item[1].strip("$"))
TO : vehicleDict["price"] = int(item[1].replace('$', '' ).replace(',', '' ))
Thank you!
The text was updated successfully, but these errors were encountered:
TLDR; the price is being stripped of the dollar sign ($), but no the comma (,). e.g. $2,500 -> 2,500 = error
System: Ubuntu 18.04.5 LTS
Code/Commit Version: Jan 20, 2019
Thanks for making this available! Going through your docs and ran installed it according to instructions. Ran crawlCities.py and finished in 25 seconds. Went to run scrapeVehicles.py, but then it fails with the following error:
Suggested fix (or something along these lines because this allows me to run the code):
scrapeVehicles.py @ line 110
FROM :
vehicleDict["price"] = int(item[1].strip("$"))
TO :
vehicleDict["price"] = int(item[1].replace('$', '' ).replace(',', '' ))
Thank you!
The text was updated successfully, but these errors were encountered: