Skip to content

Add directory as a source. Possible?

azpazp
edited April 2021 in GSA Content Generator
I'd like to scrape articles with my own script, save in a folder and use them as a source for content generator. Is it possible?
F.e. articles would be saved into folder structure 
\mysource\%keyword%\file1.txt
\mysource\%keyword%\file2.txt
Instead of folders on a local drive i can put articles on a webserver f.e. hxxp://example.com/mysource/%keyword%
GSA would load all .txt or .html files and  analyse them as usual.

Is it possible one way or another? 


Comments

  • SvenSven www.GSA-Online.de
    Getting articles from a folder is no problem by using macro %file-c:\folder\%
    Getting that from a "folder" online is not possible. It will grab that only per url and take that content. SER does not know it's a folder.
    You can however script that easily yourself in e.g. a php script that gives back a random article.
  • Lets say i have file structure:
    d:\cg\weight loss\file1.txt
    d:\cg\weight loss\file2.txt
    d:\cg\obesity\file1.txt
    d:\cg\obesity\file2.txt
    d:\cg\cheap car insurance\file1.txt
    d:\cg\cheap car insurance\file1.txt

    I try to set up content as custom source.
    What exactly i need to put in "URL/File/Folder" field if i want the source to  load files from folders tied to keyword?
    I want CG to look for articles for "weight loss" in folder "weight loss"
    "d:\cg\%search%" does not work and i dont get how %file-c:\folder\%  is supposed to work.

    When i add custom source it is available only within the project i have created. It is not available to all other projects. How can save it for all projects ?
  • SvenSven www.GSA-Online.de
    Well wait, why you need such things for GSA Content Generator (CG)? I first thought this is all about GSA Search engine Ranker (SER). I guess I did not read carefully.
    For CG you would not need macros to read in data....at least I don't see why you want to. If you want to control anything in projects, simply modify them externally....they are simple ini files.
  • "I'd like to scrape articles with my own script, save in a folder and use them as a source for content generator. "
    GSA Content Generator is great for producing clean text but i have own method for scraping relevant content. 
    I'll have to write script for mass editing ini files if its not possible to do what i want from interface
  • SvenSven www.GSA-Online.de
    you can add the stuff as a custom source and point it to a folder.
  • azpazp
    edited April 2021
    Summarizing, any way to use %search% or maybe something like %keyword% macro to load articles from folder? 
  • SvenSven www.GSA-Online.de
    I will add the macro %keyword% for next update. So you can add custom local sources with:
    c:\artciles\%keyword%\
    Thanked by 1azp
  • super, thanks :)
Sign In or Register to comment.