Closed jfmcbrayer closed 5 years ago
That's weird because that looks like perfectly valid JSON to me. Maybe the date parsing broke somehow, but if that's the case, it should have been broken before, too. Hmm.
Having looked at it, I believe that that was the problem, though I am not sure why it broke. It may be that the previous hashtag tests just worked by accident. I'll push a fix and do a new release soon.
Fixed in c442af7715f81c6558f8e356635a729905df3da7
Hello @halcy! I use library as a part of https://github.com/Horhik/Instagram2Fedi Trying to parse images to Pixelfed. Somehow it worked once and then I got the same error about JSON:
Could not parse response as JSON, response code was 200, bad json content was 'b'<!DOCTYPE html>\n\n<html lang="en">\n<head>\n\t<meta charset="utf-8">\n\t<meta http-equiv="X-UA-Compatible" content="IE=edge">\n\t<meta name="viewport" content="width=device-width, initial-scale=1">\n\t<meta name="mobile-web-app-capable" content="yes">\n\n\t<title>pixelfed</title>\n\t<link rel="manifest" href="/manifest.json">\n\n\t<meta property="og:site_name" content="pixelfed">\n\t<meta property="og:title" content="pixelfed">\n\t<meta property="og:type" content="article">\n\t<meta property="og:url" content="https://pixelfed.social/login">\n\t\n\t<meta name="medium" content="image">\n\t<meta name="theme-color" content="#10c5f8">\n\t<meta name="apple-mobile-web-app-capable" content="yes">\n\t<link rel="shortcut icon" type="image/png" href="/img/favicon.png?v=2">\n\t<link rel="apple-touch-icon" type="image/png" href="/img/favicon.png?v=2">\n\t<link rel="canonical" href="https://pixelfed.social/login">\n\t<link href="/css/app.css?id=66c10c9502955c88d471277fface8c32" rel="stylesheet" data-stylesheet="light">\n\t<script type="text/javascript">window._sharedData = {curUser: {}, version: 0}; window.App = {config: {"open_registration":true,"uploader":{"max_photo_size":"15000","max_caption_length":"2000","album_limit":"10","image_quality":"85","max_collection_length":100,"optimize_image":true,"optimize_video":true,"media_types":"image\\/jpeg,image\\/gif,image\\/png,video\\/mp4,image\\/webp","enforce_account_limit":true},"activitypub":{"enabled":true,"remote_follow":true},"ab":{"lc":true,"rec":false,"loops":false,"top":false,"polls":false,"cached_public_timeline":true,"gps":false,"spa":true,"emc":true},"site":{"name":"pixelfed","domain":"pixelfed.social","url":"https:\\/\\/pixelfed.social","description":"The original Pixelfed instance, operated by the main developer @dansup"},"username":{"remote":{"formats":{"0":"@","1":"from","2":"custom"},"format":"@","custom":null}},"features":{"timelines":{"local":true,"network":true},"mobile_apis":true,"stories":true,"video":true,"import":{"instagram":false,"mastodon":false,"pixelfed":false},"label":{"covid":{"enabled":false,"org":"visit the WHO website","url":"https:\\/\\/www.who.int\\/emergencies\\/diseases\\/novel-coronavirus-2019\\/advice-for-public"}}}}};</script>\n\t</head>\n<body>\n\t<nav class="navbar navbar-expand navbar-light navbar-laravel shadow-none border-bottom sticky-top py-1">\n\t<div class="container">\n\t\t\t<a class="navbar-brand d-flex align-items-center" href="/" title="Logo">\n\t\t\t\t<img src="/img/pixelfed-icon-color.svg" height="30px" class="px-2" loading="eager" alt="Pixelfed logo">\n\t\t\t\t<span class="font-weight-bold mb-0 d-none d-sm-block" style="font-size:20px;">pixelfed</span>\n\t\t\t</a>\n\n\t\t\t<div class="collapse navbar-collapse">\n\t\t\t\n\t\t\t\n\t\t\t\t<ul class="navbar-nav ml-auto">\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a class="nav-link font-weight-bold text-dark" href="/login" title="Login">\n\t\t\t\t\t\t\tLogin\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t</div>\n\t</div>\n</nav>\n\t<main id="content">\n\t\t<div class="container mt-4">\n <div class="row justify-content-center">\n <div class="col-lg-5">\n <div class="">\n <div class="card-header bg-transparent p-3 text-center font-weight-bold h3">Login</div>\n\n <div class="card-body">\n <form method="POST" action="https://pixelfed.social/login">\n <input type="hidden" name="_token" value="0PX5BL2deJHFCn0lF9xEyKNjd2S1I9heZjXSxIO9">\n <div class="form-group row">\n\n <div class="col-md-12">\n <input id="email" type="email" class="form-control" name="email" value="" placeholder="Email" required autofocus>\n\n </div>\n </div>\n\n <div class="form-group row">\n\n <div class="col-md-12">\n <input id="password" type="password" class="form-control" name="password" placeholder="Password" required>\n\n </div>\n </div>\n\n <div class="form-group row">\n <div class="col-md-12">\n <div class="checkbox">\n <label>\n <input type="checkbox" name="remember" > \n <span class="font-weight-bold ml-1 text-muted">\n Remember Me\n </span>\n </label>\n </div>\n </div>\n </div>\n\n \n <div class="form-group row mb-0">\n <div class="col-md-12">\n <button type="submit" class="btn btn-primary btn-block btn-lg font-weight-bold">\n Login\n </button>\n\n </div>\n </div>\n </form>\n\n <hr>\n\n <p class="text-center font-weight-bold">\n <a href="https://pixelfed.social/password/reset">\n Forgot Password\n </a>\n </p>\n </div>\n </div>\n </div>\n </div>\n</div>\n\t</main>\n\t<footer>\n <div class="container py-5">\n <p class="text-center text-uppercase font-weight-bold small text-justify">\n <a href="https://pixelfed.social/site/about" class="text-dark p-2">About</a>\n <a href="https://pixelfed.social/site/help" class="text-dark p-2">Help</a>\n <a href="https://pixelfed.social/site/terms" class="text-dark p-2">Terms</a>\n <a href="https://pixelfed.social/site/privacy" class="text-dark p-2">Privacy</a>\n <a href="https://pixelfed.social/site/language" class="text-dark p-2">Language</a>\n </p>\n <p class="text-center text-muted small mb-0">\n <span class="text-muted">\xc2\xa9 2022 pixelfed.social</span>\n <span class="mx-2">\xc2\xb7</span>\n <a href="https://pixelfed.org" class="text-muted font-weight-bold" rel="noopener">Powered by Pixelfed</a>\n <span class="mx-2">\xc2\xb7</span>\n <span class="text-muted">v0.11.3</span>\n </p>\n </div>\n </footer>\n \t<script type="text/javascript" src="/js/manifest.js?id=4e6dd9cb251d9698bfccb781db000cca"></script>\n\t<script type="text/javascript" src="/js/vendor.js?id=4b8baeff156b0f280596a985b98255bc"></script>\n\t<script type="text/javascript" src="/js/app.js?id=855c8b0847137dd56c72229ad305c032"></script>\n\t<script type="text/javascript" src="/js/components.js?id=35beb0748dd5518371686a5f00348fbf"></script>\n\t</body>\n</html>\n''
Mastodon.py version 1.5.1
I get this traceback (trimmed to the parts that are in Mastodon.py) searching in brutaldon, using Mastodon.py v1.4.1.