Skip to content

Conversation

@gitmask-anonymous
Copy link

This is an anonymous PR submitted via Gitmask - https://www.gitmask.com

@rysson rysson mentioned this pull request Mar 5, 2019
if names_found.startswith('Zwiastun') and not title.startswith('Zwiastun'):
continue
names_found = names_found.split('/')
names_found = names_found.encode('utf-8').split('/')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, jest OK.
Przy okazji może poprawić cleantitle.normalize, aby w kółko nie kodować i nie dekodować?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Po włączeniu PR #45, zmiana w normalize nie będzie konieczna.

continue

local_found = client.parseDOM(str(title_found).replace("ń ", "ń"), 'a')[0]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proszę nie wstawiać spacji

return [client.parseDOM(row, 'a', ret='href')[0]]
return None
except Exception,e:
print e
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Po to jest funkcja log_exception

return sources
except:
except Exception,e:
print e
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Po to jest funkcja log_exception


self.base_link = 'https://fili.cc'
self.url_transl = 'embed?type=%s&code=%s&code2=%s&salt=%s'
self.url_transl = 'embed?type=%s&code=%s&code2=%s&salt=%s&title=title&title2=title2'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Co to daje?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To już było w #40, proszę nie mieszać PR.

try: return title.decode('ascii').encode("utf-8")
except: pass
return str(''.join(c for c in unicodedata.normalize('NFKD', unicode(title.decode('utf-8'))) if unicodedata.category(c) != 'Mn')).replace('ł','l')
return str(''.join(c for c in unicodedata.normalize('NFKD', unicode(title.decode('utf-8'))) if unicodedata.category(c) != 'Mn').replace(u"\u0142",'l'))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To już było w #40, proszę nie mieszać PR.


import re, sys, cookielib, urllib, urllib2, urlparse
import StringIO, HTMLParser, time, random, base64, requests
import StringIO, HTMLParser, time, random, base64
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jaki cel przyświeca usuwaniu modułu requests?
Jak widzę poniżej jest o wiele więcej kodu. Zdecydowana większość to obsługa połączenia, co zapewnia requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants