diff --git a/doab_check/check.py b/doab_check/check.py index b9f17e7..5640eb6 100755 --- a/doab_check/check.py +++ b/doab_check/check.py @@ -32,6 +32,9 @@ class ContentTyper(object): if r.status_code == 405: r = requests.get(url, headers=HEADERS) return r + except requests.exceptions.SSLError: + r = requests.get(url, verify=False) + r.status_code = 511 except: # unexplained error return None diff --git a/doab_check/migrations/0005_alter_item_publisher_name_alter_item_title.py b/doab_check/migrations/0005_alter_item_publisher_name_alter_item_title.py new file mode 100644 index 0000000..f7db274 --- /dev/null +++ b/doab_check/migrations/0005_alter_item_publisher_name_alter_item_title.py @@ -0,0 +1,23 @@ +# Generated by Django 4.1.7 on 2023-04-11 17:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('doab_check', '0004_auto_20230330_1419'), + ] + + operations = [ + migrations.AlterField( + model_name='item', + name='publisher_name', + field=models.CharField(default='', max_length=1000), + ), + migrations.AlterField( + model_name='item', + name='title', + field=models.CharField(default='', max_length=1000), + ), + ] diff --git a/doab_check/models.py b/doab_check/models.py index 5f481c4..3fde900 100644 --- a/doab_check/models.py +++ b/doab_check/models.py @@ -15,8 +15,8 @@ class Item(models.Model): resource_type = models.CharField(max_length=20, null=True) # titles, publisher name can change - title = models.CharField(max_length=1000) - publisher_name = models.CharField(max_length=1000) + title = models.CharField(max_length=1000, default='') + publisher_name = models.CharField(max_length=1000, default='') def __str__(self): return self.doab.split('/')[1] if '/' in self.doab else self.doab