Kapalı

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)

Beceriler: PHP, Web Scraping, Yazılım Mimarisi, Python, Excel

Müşteri Hakkında:
( 9 değerlendirme ) Kafr Yasif, Israel

Proje NO: #35856679

Bu iş için 18 freelancer ortalamada $23 teklif veriyor

gangabass

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

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(878 Değerlendirme)
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 Daha Fazla

$20 USD in 7 gün içinde
(131 Değerlendirme)
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 Daha Fazla

$20 USD in 7 gün içinde
(53 Değerlendirme)
5.9
yadavexpert53

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

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(88 Değerlendirme)
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 Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(12 Değerlendirme)
4.8
danielkaye

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

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(13 Değerlendirme)
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 :)

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(2 Değerlendirme)
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 Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(10 Değerlendirme)
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- Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
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

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(1 Yorum)
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 gün içinde
(0 Değerlendirme)
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 Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(1 Yorum)
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 gün içinde
(0 Değerlendirme)
0.0