| Conditions | 2 |
| Total Lines | 13 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | #!/usr/bin/python |
||
| 22 | except: |
||
| 23 | update.message.reply_text("Sorry, something went wrong!") |
||
| 24 | return |
||
| 25 | if direct_link is None: |
||
| 26 | update.message.reply_text("Nothing found!") |
||
| 27 | return |
||
| 28 | msg_text = "[Image]({})".format(direct_link) + "\n" + "[View post]({})".format(page_link) |
||
| 29 | update.message.reply_text(msg_text, parse_mode="Markdown") |
||
| 30 | return query |
||
| 31 | |||
| 32 | |||
| 33 | def get_image(query): |
||
| 34 | params = {"tags": query} |
||
| 35 | response = requests.get("https://yande.re/post.json?", params=params) |
||
| 43 | return direct_link, page_link |