Welcome, Guest
News and Announcements

TOPIC: Comic Vine Scraper

Comic Vine Scraper 1 year 3 months ago #45831

Thank you for this! Worked perfect
The administrator has disabled public write access.

Comic Vine Scraper 1 year 3 months ago #45837

  • romsnesrom
  • romsnesrom's Avatar
  • Offline
  • Expert Boarder
  • Posts: 120
  • Thank you received: 12
  • Karma: 3
I do not know if I changed something in my CR setup before, but just in case Scuttle's fix did not work for you, try to add the lines to the cvdb.py located in the ComicRack's CVS script folder (usually c:\Program Files\ComicRack\Data\Scripts\Comic Vine Scraper).
The administrator has disabled public write access.

Comic Vine Scraper 1 year 3 months ago #45838

  • Vhorester
  • Vhorester's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 11
  • Karma: 0
Ok. Thank you. :)
The administrator has disabled public write access.

Comic Vine Scraper 1 year 3 months ago #45840

  • Skullberry
  • Skullberry's Avatar
  • Offline
  • Senior Boarder
  • Posts: 47
  • Thank you received: 1
  • Karma: 0
I actually figured out how to fix it. Thanks for the instructions guys.

I feel all kindsa super smart. I'm gonna go build a death ray or something before it wears off.
The administrator has disabled public write access.

Comic Vine Scraper 1 year 3 months ago #45842

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
Scuttle wrote:
I refined the code a bit. This will make the script reply the same way when fetching images as when doing the API-requests

In cvdb.py, first add a line under line 17
from resources import Resources
from utils import is_string, sstr 
from dbmodels import IssueRef, SeriesRef, Issue
from resources import Resources
import cvimprints

Then under line 428, add these two lines:
request.UserAgent = "[ComicVineScraper, version " + \
         Resources.SCRIPT_VERSION + "]" 
cvconnection.wait_until_ready() # throttle our request speed 
         request = WebRequest.Create(image_url_s)
         request.UserAgent = "[ComicVineScraper, version " + \
         Resources.SCRIPT_VERSION + "]" 
         response = request.GetResponse()
         response_stream = response.GetResponseStream()
         retval = Image.FromStream(response_stream)

Thanks again Scuttle & RobertEdelmann1974! I got it working for my setup again as well. See cbanack...you have your very own support staff. How awesome is that? You can take a sabbatical and everything still gets fixed. lol
The administrator has disabled public write access.

Comic Vine Scraper 1 year 3 months ago #45843

I copied and pasted the text into the appropriate lines and am getting the error in the attached image. I'm not sure what I could have done wrong :(

Edit: I closed and reopened it and am getting the following error:

"unindent does not match any outer indentation level"
Attachments:
Last Edit: 1 year 3 months ago by TalkingBull.
The administrator has disabled public write access.

Comic Vine Scraper 1 year 3 months ago #45844

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
TalkingBull wrote:
I copied and pasted the text into the appropriate lines and am getting the error in the attached image. I'm not sure what I could have done wrong :(

Edit: I closed and reopened it and am getting the following error:

"unindent does not match any outer indentation level"
You most definitely pasted it wrong and messed up the Python code indentation. Hopefully you backed up that file before you attempted to edit it. If so, you can open up the backup file and try again from scratch.
The administrator has disabled public write access.

Comic Vine Scraper 1 year 3 months ago #45845

  • Scuttle
  • Scuttle's Avatar
  • Offline
  • Junior Boarder
  • Posts: 22
  • Thank you received: 14
  • Karma: 6
TalkingBull wrote:
I copied and pasted the text into the appropriate lines and am getting the error in the attached image. I'm not sure what I could have done wrong :(

Edit: I closed and reopened it and am getting the following error:

"unindent does not match any outer indentation level"

Make sure you don't have any tabs in the text and that it is indented exactly as shown in my examples. Python is very picky about stuff like that.
The administrator has disabled public write access.

Comic Vine Scraper 1 year 3 months ago #45846

  • Skullberry
  • Skullberry's Avatar
  • Offline
  • Senior Boarder
  • Posts: 47
  • Thank you received: 1
  • Karma: 0
I had to read it a couple of times to understand what to paste and where.

Example:

from resources import Resources

Gets pasted under line 17 in the cvdb.py. Click anywhere in the text to see what line you are looking at, displayed in the lower right corner. When pasted correctly the new line and surrounding lines look like this...

from utils import is_string, sstr
from dbmodels import IssueRef, SeriesRef, Issue
from resources import Resources
import cvimprints

The new line is the one that ends in "Resources".
The line ending in "Issue" above it is line 17.

Same thing for the other...

request.UserAgent = "[ComicVineScraper, version " + \
Resources.SCRIPT_VERSION + "]"

...gets added under 428.

The new line and surrounding lines should look like this.

cvconnection.wait_until_ready() # throttle our request speed
request = WebRequest.Create(image_url_s)
request.UserAgent = "[ComicVineScraper, version " + \
Resources.SCRIPT_VERSION + "]"
response = request.GetResponse()
response_stream = response.GetResponseStream()
retval = Image.FromStream(response_stream)
The administrator has disabled public write access.
The following user(s) said Thank You: TalkingBull

Comic Vine Scraper 1 year 3 months ago #45847

First off let me congratulate you on being a wonderful bunch of guys to work at correcting the script for us old farts :cheer:

Unfortunately it doesn't seem to work for me :( I've cut and pasted the extra lines in but I still can't get a picture of the cover to show.

In case I haven't done it right I've attached a copy of my file with the extra lines included so if anybody out there can correct any mistake for me I would be grateful
The administrator has disabled public write access.
Time to create page: 0.223 seconds

Who's Online

We have 210 guests and 5 members online