Closed

scrap hebrew data problem need fix

Job Description:

hey i have this code that i used encoding='iso8859_8' so i could see all the hebrew data now its gives me this error

UnicodeEncodeError: 'charmap' codec can't encode character '\xdc' in position 729: character maps to <undefined>

utf-8 will solve the problem but then i can see the data

this is the code

def export_to_csv(scraped_data, csv_data, b_list):

# Combine the data from the scraped data and csv_data lists

x = [login to view URL]()

combined_data = []

for i in range(len(scraped_data)):

[login to view URL](csv_data[i] + scraped_data[i])

# Open a new file called '[login to view URL]' in write mode

with open('[login to view URL]', mode='w', encoding='iso8859_8') as csv_file:

# Create a CSV writer object

csv_writer = [login to view URL](csv_file)

# Write the headers to the CSV file

headers = ["Date", "SKU", "Product Name", "Category", "Price", "Title", "Images", "Description", "ShortDescription"]

[login to view URL](b_list)

[login to view URL](headers)

# Write the combined data to the CSV file

print(len(combined_data))

for row in combined_data:

[login to view URL](0, [login to view URL]("%x"))

print(row)

[login to view URL](row)

def main():

csv_data = []

scraped_data = []

with open('[login to view URL]', 'r', encoding='iso8859_8') as file:

reader = [login to view URL](file)

for row in reader:

data = []

sku = row['sku']

productname = row['product name']

catgory = row['catgory']

price = row['price']

title, imageslink, b_list, span_list, descriptions, shortdescription = searchproduct(sku, productname)

if title is None:

continue

[login to view URL]([title, imageslink, descriptions, shortdescription])

[login to view URL](span_list)

print(span_list)

[login to view URL](data)

[login to view URL]([sku, productname, catgory, price])

export_to_csv(scraped_data, csv_data, b_list)

Skills: PHP, Web Scraping, Software Architecture, Python, Excel

About the Client:
( 9 reviews ) Kafr Yasif, Israel

Project ID: #35856679

18 freelancers are bidding on average $23 for this job

gangabass

I can quickly solve your encoding issue for just $30. Could you show your code as a .py file (to prevent formatting)? Roman

$30 USD in 1 day
(878 Reviews)
8.2
BitLabs

Hello, I have gone through your outsourced requirements " scrap hebrew data problem need fix " and have analyzed that I have right skills ( PHP Python Excel Web Scraping Software Architecture ) to execute your e More

$20 USD in 7 days
(131 Reviews)
6.8
ShakeelASESE

I am working as a Developer, Programming Expert, Data Scientist and expert in ->Python, Tensor Flow Framework, C, C++, C#, VB, Visual Studio, Online Scrapping, ->Analysis and Modeling MATLAB, Predictive Modelling, St More

$20 USD in 7 days
(53 Reviews)
5.9
yadavexpert53

Hello, Now It's fixed. Pls .msg me and get you final code......................................................thanks!

$20 USD in 1 day
(88 Reviews)
5.5
gajematthias

Hello! How are you? I'm a python development expert with 8+ years experience and I'm very familiar with web scraping and data mining using BS4 , selenium and undetectable chrome driver. I have solid experience in scra More

$30 USD in 1 day
(12 Reviews)
4.8
danielkaye

אני יכול לסדר לך את הקוד תוך כמה דקות אם יש לך קובץ לדוגמא ואם תוכל לשלוח לי את הקוד עם כל האינדנטים וכו

$20 USD in 1 day
(13 Reviews)
4.9
rileytswanston

Hello Dear, How are you? just went through your job description. very very interested in this role. want to work on it. would love to discuss further more with you. Thank you :)

$20 USD in 1 day
(2 Reviews)
3.6
nikhilroyjs

Hi, I am an experienced software engineer and have a strong background in Python and web scraping. I can help you fix the error in your code by encoding the data using utf-8. I will also make sure to test the code thor More

$30 USD in 1 day
(10 Reviews)
3.3
STE172004

The error message you're seeing is related to the fact that the 'iso8859_8' codec cannot encode the specific character '\xdc' in your data. This is likely because the character is not a valid character in the ISO 8859- More

$20 USD in 1 day
(0 Reviews)
0.0
simoguermoud

Hello , could you explain me more about that issue ? utf-8 should correct that , but is it working for you ? please let me know so I can see what can I do

$20 USD in 1 day
(1 Review)
0.0
Mdibrahim47

I got the same error in my thesis when I scraped the data, basically, it happens when want to encode a special character, and I solved it. I am waiting for your response. Thank you

$30 USD in 2 days
(0 Reviews)
0.0
topgradeclubltd

Hi, Greetings and hoping you are doing well, i welcome you to my profile where quality and client satisfaction is the Priority. I am Expert Dominic and i hope to cooperate with you on your project . CERTIFIED EXPERT I More

$30 USD in 1 day
(1 Review)
0.0
yovava22

Fluent in Hebrew. Can help u with that. I am a software engineer who work in israel tech and have 15 years of experience.

$30 USD in 7 days
(0 Reviews)
0.0