I have completed the assignment and i am getting the desired output but when i submit this csv, i am getting a score of 0% for some reason
Submission Doubt
hey @devchopra999_11c6416ab7f09bbf ,
the column names should not be A, B and C
it should be the one that you have in 1 row.
change that and then try again.
i was using the wrong url,
How do i scrape the complete image url? if i scrape the one in src it gives the link a
s “…/…/…/media etc.” which doesnt take me to the image of the pic
so i need to get the link from current source from the box that appears on the link
right now if i remove the ABC column and use the img src link then i am getting 84% only, lemme know if there’s some other reason regarding that
just use the same link as it is given in src , dont need to change it
and add the columns as
image_url,book_title,product_price
and then try once
still getting 84% only
okay checking it again once
found the problem with the 84% marks?
dont replace commas in books title with spaces.
for the books title , that have commas in them , just enclose them into qoutes and then try submitting.
replace , with “,” ?
nothing to replace it with.
just enclose those sentences inside quotes and it will work.
getting an accuracy of 13% now
how did you enclosed them ?
share your updated code
this is what i added at line 50
book_title=’’’ “{}” ‘’’.format(book_title)
hey @devchopra999_11c6416ab7f09bbf ,
sorry to be so late…
there was some issue with my account.
instead of this
book_title='''"{}"'''.format(book_title)
try this once
"'{}'".format(book_title)
earlier I didn’t add the condition to enclose only book titles with , in them …on additing it i am getting 93 % accuracy now. whats missing?
i think you are not getting the complete titles
book_titles=books_data.css("h3 a::text").getall()
if you inspect this for the fist book , then what you will get , check that once.
with that i get “A light in the…”
but I am taking the value from the title tag so I get the complete name
@prashant_ml here are the first few lines of my file
image_url,book_title,product_price
../media/cache/2c/da/2cdad67c44b002e7ead0cc35693c0e8b.jpg,A Light in the Attic,£51.77
../media/cache/26/0c/260c6ae16bce31c8f8c95daddd9f4a1c.jpg,Tipping the Velvet,£53.74
../media/cache/3e/ef/3eef99c9d9adef34639f510662022830.jpg,Soumission,£50.10
../media/cache/32/51/3251cf3a3412f53f339e42cac2134093.jpg,Sharp Objects,£47.82
../media/cache/be/a5/bea5697f2534a2f86a3ef27b5a8c12a6.jpg,Sapiens: A Brief History of Humankind,£54.23
../media/cache/68/33/68339b4c9bc034267e1da611ab3b34f8.jpg,The Requiem Red,£22.65
../media/cache/92/27/92274a95b7c251fea59a2b8a78275ab4.jpg,The Dirty Little Secrets of Getting Your Dream Job,£33.34
../media/cache/3d/54/3d54940e57e662c4dd1f3ff00c78cc64.jpg,"The Coming Woman: A Novel Based on the Life of the Infamous Feminist, Victoria Woodhull",£17.93
../media/cache/66/88/66883b91f6804b2323c8369331cb7dd1.jpg,The Boys in the Boat: Nine Americans and Their Epic Quest for Gold at the 1936 Berlin Olympics,£22.60
../media/cache/58/46/5846057e28022268153beff6d352b06c.jpg,The Black Maria,£52.15
../media/cache/be/f4/bef44da28c98f905a3ebec0b87be8530.jpg,"Starving Hearts (Triangular Trade Trilogy, #1)",£13.99
../media/cache/10/48/1048f63d3b5061cd2f424d20b3f9b666.jpg,Shakespeare's Sonnets,£20.66
../media/cache/5b/88/5b88c52633f53cacf162c15f4f823153.jpg,Set Me Free,£17.46
../media/cache/94/b1/94b1b8b244bce9677c2f29ccc890d4d2.jpg,Scott Pilgrim's Precious Little Life (Scott Pilgrim #1),£52.29
../media/cache/81/c4/81c4a973364e17d01f217e1188253d5e.jpg,Rip it Up and Start Again,£35.02
../media/cache/54/60/54607fe8945897cdcced0044103b10b6.jpg,"Our Band Could Be Your Life: Scenes from the American Indie Underground, 1981-1991",£57.25
../media/cache/55/33/553310a7162dfbc2c6d19a84da0df9e1.jpg,Olio,£23.88
../media/cache/09/a3/09a3aef48557576e1a85ba7efea8ecb7.jpg,Mesaerion: The Best Science Fiction Stories 1800-1849,£37.59
../media/cache/0b/bc/0bbcd0a6f4bcd81ccb1049a52736406e.jpg,Libertarianism for Beginners,£51.33
../media/cache/27/a5/27a53d0bb95bdd88288eaf66c9230d7e.jpg,It's Only the Himalayas,£45.17
../media/cache/5d/72/5d72709c6a7a9584a4d1cf07648bfce1.jpg,In Her Wake,£12.84
../media/cache/5c/c8/5cc8e107246cb478960d4f0aba1e1c8e.jpg,How Music Works,£37.32
hey @devchopra999_11c6416ab7f09bbf ,
can you share me your complete output file.
i can’t run your code.