techwizrd / MangaFox-Download-Script

A script that lets you download mangas from mangafox.com
77 stars 27 forks source link

Can't encode... #23

Open shideneyu opened 8 years ago

shideneyu commented 8 years ago
➜  Desktop  python ./mfdl.py  boku_dake_ga_inai_machi
Url: http://mangafox.me/manga/boku_dake_ga_inai_machi
===============================================
Chapter v06c035
===============================================
Getting chapter urls
Getting image urls...
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 1
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/1.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 2
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/2.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 3
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/3.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 4
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/4.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 5
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/5.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 6
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/6.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 7
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/7.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 8
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/8.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 9
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/9.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 10
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/10.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 11
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/11.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 12
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/12.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 13
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/13.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 14
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/14.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 15
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/15.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 16
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/16.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 17
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/17.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 18
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/18.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 19
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/19.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 20
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/20.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 21
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/21.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 22
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/22.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 23
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/23.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 24
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/24.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 25
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/25.html
url_fragment: http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/
page: 26
Getting image url from http://mangafox.me/manga/boku_dake_ga_inai_machi/v06/c035/26.html
Traceback (most recent call last):
  File "./mfdl.py", line 174, in <module>
    download_manga(sys.argv[1])
  File "./mfdl.py", line 162, in download_manga
    image_urls = get_chapter_image_urls(url_fragment)
  File "./mfdl.py", line 86, in get_chapter_image_urls
    page_soup = get_page_soup(chapter_url + page + '.html')
  File "./mfdl.py", line 31, in get_page_soup
    return BeautifulSoup(html_file.read())
  File "/usr/lib/python2.7/dist-packages/BeautifulSoup.py", line 1522, in __init__
    BeautifulStoneSoup.__init__(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/BeautifulSoup.py", line 1147, in __init__
    self._feed(isHTML=isHTML)
  File "/usr/lib/python2.7/dist-packages/BeautifulSoup.py", line 1189, in _feed
    SGMLParser.feed(self, markup)
  File "/usr/lib/python2.7/sgmllib.py", line 104, in feed
    self.goahead(0)
  File "/usr/lib/python2.7/sgmllib.py", line 143, in goahead
    k = self.parse_endtag(i)
  File "/usr/lib/python2.7/sgmllib.py", line 320, in parse_endtag
    self.finish_endtag(tag)
  File "/usr/lib/python2.7/sgmllib.py", line 358, in finish_endtag
    method = getattr(self, 'end_' + tag)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfa' in position 4: ordinal not in range(128)
techwizrd commented 8 years ago

What version of Python are you using?

tuefekci commented 8 years ago

Its based on the logs python2.7