Skip to content

Commit

Permalink
bypass dmm region check not 404 event.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonpeng2014 committed Jan 2, 2023
1 parent 91371e8 commit b3e1448
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scrapinglib/fanza.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def search(self, number):
self.detailurl = url + fanza_search_number
url = "https://www.dmm.co.jp/age_check/=/declared=yes/?"+ urlencode({"rurl": self.detailurl})
self.htmlcode = self.getHtml(url)
if "Sorry! This content is not available in your region." in self.htmlcode:
continue
if self.htmlcode != 404:
self.htmltree = etree.HTML(self.htmlcode)
break
Expand Down

0 comments on commit b3e1448

Please sign in to comment.