mouuff / mtranslate

A simple api for google translate
MIT License
286 stars 83 forks source link

Parameter Adjustment Needed #19

Closed weidenrinde closed 3 years ago

weidenrinde commented 3 years ago

Google changed it's parameters and the result page sometimes looks different. The following changes are necessary:

1.) ht -> tl base_link = "http://translate.google.com/m?tl=%s&sl=%s&q=%s"

2) the regex needs to test for two classes and may include newlines expr = r'(?s)class="(?:t0|result-container)">(.*?)<'

mouuff commented 3 years ago

Thank you for your support! Changes have been pushed!