Linked Questions

-1 votes
1 answer
2k views

import re data2 = '' file = open('twitter.txt', 'r') for i in file: thing = re.sub(r'[^\x00-\x7f]',r'', str(file[i])) print(str(thing)) Hi, I'm very new to Python. After scraping a bunch of ...
notfeelingit's user avatar
0 votes
3 answers
1k views

I am trying to scrape the prayer time from a website which is www.hujjat.org. Here is the html part of the area I am interested in (as you may have noticed the class attribute is the same for all ...
Ahmed.B's user avatar
  • 89
4 votes
2 answers
1k views

I am importing a bunch of data from excel using xlrd on python I get all my data in string like this : text:u'L\xc9GENDE' I manipulate these data and I try to put them back in excel (using ...
user3724234's user avatar
0 votes
1 answer
1k views

I've finished my first game, and I'd like to add the high score to the 'game over' screen. I have a variable called 'score'. This 'score' increases as you get further into the game. This 'score' ...
Zino Wardenier's user avatar
1 vote
2 answers
1k views

When i am trying to extract the data from an xlsx files. I get the encoding details with the data as well. Consider the code as shown below, column_number = 0 column_headers = [] #column_headers = ...
golldy's user avatar
  • 1,309
-2 votes
1 answer
824 views

I have a list of urls: ['https:\\u002F\\u002Furl.net\\u002F800x600\\u002Ff031d92dc2ea2f928e475f27ff84fad2db99b01982ff846e50028f6edc71c140\\u002Fimage.jpg', 'https:\\u002F\\u002Furl.net\\u002F800x600\\...
adam's user avatar
  • 51
0 votes
1 answer
1k views

I've got a python file that I'm loading as a script into the maya script editor. The python file is currently encoded as UTF-8. I have the need to use the ↑ and ↓ characters (or any other arrow ...
Design Runner's user avatar
0 votes
1 answer
595 views

I am using Readability Parser API to extract content from a web page. It is ok when the web page is in Latin character set, but when I extract article in Cyrillic, it ends up with the following: <...
nickbusted's user avatar
  • 1,109
0 votes
1 answer
918 views

Django when i send the following string from an ajax submit i get the following string in unicode.How to decode this $.post("/records/save_t/",snddata, function(data){ if(data == 0 ){ ...
Hulk's user avatar
  • 34.4k
0 votes
0 answers
919 views

I'm trying to insert into a table, but it seems that the file I opened has non-ascii characters in it. This is the error I got: sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless ...
wpakt's user avatar
  • 1,083
0 votes
1 answer
630 views

I have this text in html page <div class="phone-content"> ‪050 2836142‪ </div> I extract it like this: I am using xpath to extract the ...
Marco Dinatsoli's user avatar
0 votes
1 answer
751 views

How convert u'[<Car: { surname :yass name : zazadz } >] in [<Car: { surname :yass name : zazadz } >]. So how convert unicode in django.db.models.query.QuerySet ?
YassVegas's user avatar
  • 171
3 votes
2 answers
350 views

For most news articles, the first sentences always start with a location follows by hyphen or a comma, such as KUALA LUMPUR: North Korea and Malaysia on Monday locked horns over the investigation ...
Sean's user avatar
  • 1,161
0 votes
1 answer
733 views

I tried all in this interesting thread Changing default encoding of Python? but nothing work for me. I use sublime text and when I try : import sys print(sys.stdout.encoding) Output is : US-ASCII I ...
jmercier's user avatar
  • 584
1 vote
0 answers
675 views

I have a string returned from python by json.dumps(). I am using python 2.6 or 2.7. When I parse it using JSON.parse() in JavaScript. I got undefined with keys. My string recieved by javascript(ajax) ...
Nick Dong's user avatar
  • 3,796

15 30 50 per page